Python Forum
How to set turns playing tictactoe?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to set turns playing tictactoe?
#2
You can Use:
while True:
   if gameWon(Boolean):
       break
       # or popup dialog to restart
   else:      
       #players turn
       #computers turn
Al Swiegart has written many free books on python and games. In some linux distributions his games are installed by default and the code is open sourced available to read and tweek. Making Games book can be found here:
https://inventwithpython.com/makinggames.pdf
at the end of the book he has several human vs computer games with code.
You are on the right track keep going,
Joe
Reply


Messages In This Thread
How to set turns playing tictactoe? - by Mariano - Apr-10-2019, 10:41 PM
RE: How to set turns playing tictactoe? - by joe_momma - Apr-11-2019, 06:26 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020