Ok I really need help, I have to make a PHP script that will play Tic Tac Toe against the user.
The specs for the game are:
In this game, the visitor competes against the server to see who will win. The visitor always goes first and uses X. The server uses O. At each turn, including the first, the visitor can choose to put an X in any unoccupied square. The server responds by placing its O in an unoccupied square according to whatever logic you have built into the code. Obviously the logic should analyze and react to what has previously been placed in each square
Once all squares have been populated, and if the game is won by either side, a message appears congratulating that side. If no one wins then a message appears that congratulates both players for playing a good game.
In both instances a link is displayed inviting the visitor to play again assignment7a.php is the launch page that presents the game board, instructions and takes the first move from the visitor
assignment7b.php is the code page that analyses what is on the board and either computes the move of the server or the identity of the winner. The only thing that might be displayed to the user on this page is a link that says "Click to continue" .
This link brings up assignment7c.php assignment7c.php has a display that is identical to assignment7a.php presenting the game board, instructions and taking all moves (except the first move). In addition it will display the congratulations as required and the offer of a new game.
I am so lost it is not even funny. We have only taken this course for a month and no one has an idea how to do it. The teacher will not answer any questions cause he feels we should have to find out the answer on our own.
Thanks for any help I can get.😕