SCENARIO: Tic-Tac-Toe board is an online game consists of nine squares and should be played between two players. In case
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
SCENARIO: Tic-Tac-Toe board is an online game consists of nine squares and should be played between two players. In case
Software engineering
SCENARIO: Tic-Tac-Toe board is an online game consists of nine squares and should be played between two players. In case that there is only one player, that player can play against the computer. player1 will represent X and the other player will represent O. The game always start with player1. Before playing the game, If the player going to play against another player, they must enter their name first. After that, the players can start the game. The game starts when player1 click on one of the squares. and then X will be drawing on the clicked square automatically. After the player1 made his move, the other player can play by clicking on the one of the other empty squares. And then O will be drawing automatically on the clicked square. The players will take turns in clicking the empty squares. The winner is the first player that gets three of the same symbols (X or O) in a row, either vertically, horizontally, or diagonally. When one of the player wins, a message box will appear to inform who is the winner. If the whole squares get full and no one of the players get three of the same symbols (X or O) in a row, either vertically, horizontally, or diagonally, a message box will appear to inform the players that the game ended with a draw. When the game is finished, the player can either play a new game or end the game. If the player want play against the computer, he should choose the default mood. After that, the player should start the game by clicking on any of the square. X will be drawing automatically, after the click. Then, the computer will start his turn automatically and O will be drawing automatically on the square that the computer has chosen. If either the player or the computer gets three of the same symbols (X or O) in a row, either vertically, horizontally, or diagonally. Will be considered as a winner. A message box will I appear to inform who is the winner. If the whole squares get full and no one get three of the same symbols (X or O) in a row, either vertically, horizontally, or diagonally, there will be no winner. And a message box will appear to inform the players that the game ended with a draw. Finally, the player can play a new game or end the game