Question: Do this coding on C++ Project: Write a program that will be used as part of a game. The game is played on a board

Do this coding on C++  Do this coding on C++ Project: Write a program that will
be used as part of a game. The game is played on
a board (like a chess board or a checkers board) that has
dimensions nxn, where n is even. In the picture below n -4.

Project: Write a program that will be used as part of a game. The game is played on a board (like a chess board or a checkers board) that has dimensions nxn, where n is even. In the picture below n -4. The game uses tiles that are white on one side, and black on the other side (they can be "flipped" over to change their color). One player plays white; the other player plays black. The picture below shows the initial board configuration, which has two white and two black tiles pre-placed in the center. Observe that rows and columns are labelled with letters Figure 1: Starting positions on game board. A "turn" consists of a player laying a tile of his/her own color on a candidate empty board position, subject to the following two rules 1. There must be a continuous straight line of tile(s) of the opponent's color in at least one of the eight directions from the candidate empty position (North, South, East, West, and diagonals). 2. In the position immediately following the continuous straight line mentioned in #1 above, a tile of the player's color must already be placed. After playing a tile at a position that meets the above criteria, all of the lines of the opponent's tiles that meet the criteria above are flipped to the player's color. In the picture below, all of the candidate positions for White's next move are shown shaded. Figure 2: All of the candidate positions for White's next move

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!