Playing Tic-Tac-Toe .A. write a program to allow two players to play the game of tic-tac-toe interactively using ezgraphics and python programming. The computer will need to decide if the game has...


Playing Tic-Tac-Toe






.A. write a program to allow two players to play the game of tic-tac-toe interactively using ezgraphics and python programming. The computer will need to decide if the game has reached win or draw after each move.


.B. Write program to allow the computer to play using randomly generated moves. Again, the computer need to decide if the game has reached the end after each move.


.C. Make a smarter computer program by enhancing the computer play with the following functions:



  • write a function to play to win i.e. if the computer has two in a line, then end of game with the third.

  • write a function to play defensively. i.e. if the user has two in a line, then play the thirds to block.

  • write a function to play aggressively. i.e. play the center if it is available.

  • If none of the above applies, play random.


D. Can you enhance the rules described above to make a even better computer player?

Apr 19, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here