| EIW Fall 2005 HW2: PHP Tic-tac-toe |
| EIW Home |
You may work with a single partner on HW#3. You may not share code in any form with anyone other than your partner! Feel free to get ideas from sample PHP you can find on the WWW, but DO NOT submit code that you did not write. Submitting code you find on the web is a violation of the course policy on academic integrity and will result in (at a minimum) a zero for HW3 and a 2 letter grade drop for the course.
You need to create a tic-tac-toe game in which the computer (your PHP program) plays against a human via the web.
In case you don't know the game, here are some references:
Start a new game at any time (by pressing a button or hyperlink).
Enforce the rules. A player must not be able to cheat. Remember that a human can type in URLs and can make up thier own forms if necessary!
Recognize a win. If either the human or user wins the game, there must be some indication that the game is over, including something that states who the winner was. No more moves are allowed until the user starts a new game.
Recognize a draw (a tie). Once the board is filled up, there must be some indication that the game is over and no more moves are allowed until the user starts a new game.
Your program must always win if possible (given any situation in which the computer move could result in a win, it must make that move).
Your progam must always block a win if possible. If the board includes multiple possible wins for the human, your game must block one of them.
The user must be able to make a move by simply clicking on an open spot on the board. Moves must not require the user to type in anything.
Feel free to use JavaScript to make the board look nice, to support how moves are made, etc. However, the entire game logic must be supported by PHP (this is not a Javascript assignment!).
You don't have to display Xs and Os, feel free to use images to spice up the game.
You need to submit all files necessary to support your game (php program and any other files needed) to the WebCT dropbox labeled "hw3". Make sure that all URLs generated by your system are relative, so that we can install and test your code.
IMPORTANT!!!: If you work with a partner, you should only have one person submit, and the HTML file must include the names of both team members (this must appear when we view your page in a broswer, we don't want to have to hunt through the code for this).
| EIW Fall 2005 |