i was required to build two player Tic Tac Toe Game in Dos mode.
but there is some error in my code..can any body help me pls.. i very depressed abt my assignment i am workin on it 4 a week and i dont know wahts wrong with it. can some one kindly coorrect m code.. thanks a ton
Requirements:
You cannot use arrays in this assignment.
There will be nine boxes on the screen numbered from 1 to 9. Game should prompt the player number who has the next turn and ask that player to enter a number between 1 and 9. If the user enters a number of a box which is already occupied, the game will give an error and ask the user to re-enter his move.
Both players will use the keyboard to input their move, one by one.
Computer should tell whether the game ended successfully either in draw or Success of any player.
Game can be ended at any time if any player enters zero. But computer should prompt the message either you want to quit or resume the game.
There will be only one undo move. undo will be done if any player enters -1. Then his last move should be removed from the board and he should be prompted to enter the move again.
The game should ask the names of both players at the start.
Move of player 1 should be indicated on the board by a O and move of player 2 should be indicated by X
Your should write separate function to check a move for validity, another function to check if a player has won or if the game is draw, another function to input player names, and any other functions that you can make.
Your main function should have a loop that should take user moves and perform the functions accordingly. "