Frame complete game, only the outer edges of a square drawn on the table is a game played with 2 players. Sequence of a square drawn from the player wants to draw a non-edge. Underline that this edge of the square is not the last edge of the square is completed and the last edge of the square belongs to the player draws. As long as the player completes a square edge may continue to draw. The aim is to have the maximum number of frames in the game. Accordingly, at least 7x7 in size up to 3x3 on a table such a program will be required to simulate a game.
The program first tries to 2 players should be taken to represent a character.

Order from the player wants to draw the edge of the square letters of the line, wants to draw the edge of the column number, and number [1-4] enters. One of the square edges of the numbers can be considered as follows:

The player enters the data, not on the table and / or non-underlined a side entrance belirtmiyorsa istenilmelidir repeated. The player enters valid data, the edge of the table to be displayed underlined.

If you plotted the edge, the edge of a square if it is not the last row to the next player passes. If you are drawn in a square edge tamamlıyorsa, the table is displayed on the screen that represents the character of the player into the frame be printed. In this case, the player may continue to draw the edge.

All frames of the table is complete, the status of the table, they have the players and the game as a result of the number of frames to be displayed
Player of X number of frames: 14
Y'e Player of the number of frames: 11
X won the game.
Would you like to play again (Y / N)?
Notes:
1. The edges of the squares drawn in the table, which underline the edges of each square sum of the squares of numbers can be represented by keeping a matrix.
2. Using two-dimensional arrays are expected to occur in the program and the program's functions.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.