daleachacon
Beta member
- Messages
- 1
guys can you help me about my homework... we are asssigned to create a one player game of "mini SoS" here's the specification:
Create a one player game of “Mini SOS”.
The game of “Mini SOS” is played on a 3 by 3 game board.
There are 2 players in the game – the user vs. the computer. The user is given the option if he/she would like to go first. The 2 players alternate turn. During a player’s turn, he/she can choose an empty square from the table and write an ‘S’ or an ‘O’.
HereÂ’s how the computer decides its next move.
If it can win the game with its current move, it will take the win.
Otherwise, it will randomly take any open square and randomly write an ‘S’ or an ‘O’.
The first player to form the word SOS on 3 squares of any row, column or main diagonal of the board game wins the game. If all squares were filled up without any player winning, the result of the game is considered a tie/draw. Upon a win or a draw, the game ends. At the end of the game, the computer shall declare who won the game. Afterwards, the computer will ask if the player wants to play again.
Possible Additional Specifications
1.Different levels of difficulty (easy, hard, difficult)
The given algorithm on how the computer decides is not very smart. If you want to implement your own algorithm, do so but still implement what is included in the specification.
2.Use of arrays and subprograms to improve the readability and to shorten the length of your code.
3.Graphics
4.Scoring System
5.Others
Create a one player game of “Mini SOS”.
The game of “Mini SOS” is played on a 3 by 3 game board.
There are 2 players in the game – the user vs. the computer. The user is given the option if he/she would like to go first. The 2 players alternate turn. During a player’s turn, he/she can choose an empty square from the table and write an ‘S’ or an ‘O’.
HereÂ’s how the computer decides its next move.
If it can win the game with its current move, it will take the win.
Otherwise, it will randomly take any open square and randomly write an ‘S’ or an ‘O’.
The first player to form the word SOS on 3 squares of any row, column or main diagonal of the board game wins the game. If all squares were filled up without any player winning, the result of the game is considered a tie/draw. Upon a win or a draw, the game ends. At the end of the game, the computer shall declare who won the game. Afterwards, the computer will ask if the player wants to play again.
Possible Additional Specifications
1.Different levels of difficulty (easy, hard, difficult)
The given algorithm on how the computer decides is not very smart. If you want to implement your own algorithm, do so but still implement what is included in the specification.
2.Use of arrays and subprograms to improve the readability and to shorten the length of your code.
3.Graphics
4.Scoring System
5.Others