my professor gave this machine problem as a part of our finals.can you help me out/
here are the instructions:
2 player tictactoe
-program a 2player tictactoe game wherein two players alternately key-in the coordinates to which they want to place a 'o' or an 'x'
-the game board is a 3x3 array
-the first player marks the array with 'o's;the second marks the array with 'x's
-the game starts with an array filled with dashes;players take turns in marking the array;a marked cell can no longer be marked
-declare that a player won if he has marked three cells in a row,column or diagonal;if the array is filled-up without a winner,declare that nobody won..
Sample Run:
_______________________________________________________
Welcome to the tic-tac-toe game
Player 1, input coordinates: 1 1
o--
---
---
Player 2, input coordinates: 2 2
o--
-x-
---
Player 1, input coordinates: 2 1
o--
ox-
---
Player 2, input coordinates: 1 3
o-x
ox-
---
Player 1, input coordinates: 3 1
o-x
ox-
o--
Player 1 wins!
___________________________________________________
i hope someone can help me on this.
thanks.