This project is about developing a tictactoe game using graphics.py in python, for playing a human player
Question:
This project is about developing a tictactoe game using graphics.py in python, for playing a human player against computer AI. Attached is a browser version of a tictactoe. It gives you an idea of how the UI of your application would look like. The main difference would be you must add a text widget at the bottom of the grid to show when it is "human" player turn to play, saying something like "Your turn", to indicate to you that it is your turn to play.
The main features are of the game is as follows:
1) AI player should pause before playing its turn. You can achieve this using time.sleep() function as we did last week.
2) AI players should play "intelligently". It means it should try to prevent the human players from winning. I outlined a simple AI at the end of this week's session. Refer to the zoom recording for this. A screenshot of my drawing is also attached to this assignment. Basically AI player first tries to block the human player from doing any of the 3 matches: row match, column match, cross match. If no immediate match exists to block, then the AI player picks a non-occupied cell and fills it with a computer.png picture. The 2 pictures, Apple.png and Computer.png can be found in the tictactoe_Browser folder.
3) Once a computer or Human player wins, a message in the text area below the grid should be displayed for 5 seconds. After 5 seconds, the message should change to "Press inside to play again, or outside to quit". This means if the user clicks inside the text area, the game should start again. If the user clicks outside, it should quit the game and clock the graphics window.