Tic-Tac-Toe (made easy) - 1.0
It is Tic-Tac-Toe coded so simply that anyone can follow it.
Joshua Powell
(powellj6)
It is just a simple Tic-Tac-Toe game coded very simply with comments describing what each piece of code does.
I did it to prove that there was another way of doing it because I just didn't understand the other tic-tac-toe game code I kept finding. It was just too complicated. So here it is, hopefully, dumbed down enough for even the most greenest of noob.
Nothing fancy, just simple ASCII Art for the Tic-Tac-Toe Board.
Also, it is coded in Python 3.1 Any ealier versions of Python will not run this game. Windows, Mac, others. It really shouldn't matter what you use but if you are having some problems with it or find some bugs leave a comment and I'll fix them and have a new version out. All comments and criticisms are welcome.
Enjoy, J
oshua Powell
Changes
Links
Releases
Tic-Tac-Toe (made easy) 1.0 — 20 Aug, 2011
Pygame.org account Comments
-
Bemoniri 2012-01-01 17:19
hi
there were some problems with the code
i'm working on it know...the program crashes when you win
. -
Sasi 2012-03-17 04:37
can i get a documentation for tic tac toe
-
Kahuna 2014-12-28 07:11
Didnt Work..!! Goes on Infinitely
-
Your name 2015-05-29 16:37
nately your image upload failed. Please verify that your image is under 2MB. If you continue seeing this error, please try again later.
-
Your name 2015-05-29 16:38
It is just a simple Tic-Tac-Toe game coded very simply with comments describing what each piece of code does.
I did it to prove that there was another way of doing it because I just didn't understand the other tic-tac-toe game code I kept finding. It was just too complicated. So here it is, hopefully, dumbed down enough for even the most greenest of noob.
Nothing fancy, just simple ASCII Art for the Tic-Tac-Toe Board.
Also, it is coded in Python 3.1 Any ealier versions of Python will not run this game. Windows, Mac, others. It really shouldn't matter what you use but if you are having some problems with it or find some bugs leave a comment and I'll fix them and have a new version out. All comments and criticisms are welcome.
Enjoy, J
oshua Powell
Links
Home Page: http://www.mediafire.com/?noc4...
Screenshot
click to view original size
Releases
Tic-Tac-Toe (made easy) - 1.0 - Aug 20, 2011
-
Your name 2015-05-29 16:38
August 21, 2011 6:49pm - Zachariah Callaway - nickname: (xzcallaway)Opps sorry. I posted that on the wrong tic tac toe.August 21, 2011 5:11am - Jouni Järvinen - nickname: (rautamiekka)@masterlee
No, §python§ on my system leads to Python v2.7. I tested by explicitly calling the exe with same result but calling v3.1 worked.August 20, 2011 10:53pm - Zachariah Callaway - nickname: (xzcallaway)Man for you, that program is huge. I'm used to seeing the tiniest little codes that always make me scratch my head. I love looking at those tiny little things.August 20, 2011 6:03pm - Carsten Eggers - nickname: (masterlee)@rautamiekka
It appears you started the program with Python 3. In Python 3 the usage of the input function hat changed. In python input is exactly the same as raw_input. Thats the reason for the bug. Use 3to2.py or python3 itself to get rid of the problem. For an quick ahck you could also write input=raw_input in the first line of ATicTacToeJPVersion.py.Unfortunately multiple white spaced will be folded to one space on html pages.
Testing some chars: »«¢„“â€ÂµÃ¦Å¿Ã°Ä‘ŋħł@ł€¶ŧâ†â†“→øþAugust 20, 2011 3:35pm - Jouni Järvinen - nickname: (rautamiekka)Stupid comment system, fourth time posting this.
Apparently the comment system fucked up, not submitting my first comment, so here it goes again:
Looking interesting, but there's a grave bug.
§§§§§§§§§§§§§§§§§
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.C:\Users\rautamiekka>python "C:\Users\rautamiekka\Documents\_Text-based_\_Python_\ATicTacToeJPVersion.py"
Hello, and welcome to Joshua Powell's version of Tic-Tac-Toe.
You shall be battling the mighty intellect of Joshua's AI Computer Programming!
Play if you dare!!!
()
()
Which letter do you want to be? "X" or "O"
x
Traceback (most recent call last):
File "C:\Users\rautamiekka\Documents\_Text-based_\_Python_\ATicTacToeJPVersion.py", line 841, in <module>
start() #runs the def start()
File "C:\Users\rautamiekka\Documents\_Text-based_\_Python_\ATicTacToeJPVersion.py", line 818, in start
which = input().upper() #gets input from the player. also, the upper() means that if the player types in a 'x' (lowercase 'x'), the code will recognize it as a 'X' (capital 'X')
File "<string>", line 1, in <module>
NameError: name 'x' is not definedC:\Users\rautamiekka>python "C:\Users\rautamiekka\Documents\_Text-based_\_Python_\ATicTacToeJPVersion.py"
Hello, and welcome to Joshua Powell's version of Tic-Tac-Toe.
You shall be battling the mighty intellect of Joshua's AI Computer Programming!
Play if you dare!!!
()
()
Which letter do you want to be? "X" or "O"
o
Traceback (most recent call last):
File "C:\Users\rautamiekka\Documents\_Text-based_\_Python_\ATicTacToeJPVersion.py", line 841, in <module>
start() #runs the def start()
File "C:\Users\rautamiekka\Documents\_Text-based_\_Python_\ATicTacToeJPVersion.py", line 818, in start
which = input().upper() #gets input from the player. also, the upper() means that if the player types in a 'x' (lowercase 'x'), the code will recognize it as a 'X' (capital 'X')
File "<string>", line 1, in <module>
NameError: name 'o' is not definedC:\Users\rautamiekka>python "C:\Users\rautamiekka\Documents\_Text-based_\_Python_\ATicTacToeJPVersion.py"
Hello, and welcome to Joshua Powell's version of Tic-Tac-Toe.
You shall be battling the mighty intellect of Joshua's AI Computer Programming!
Play if you dare!!!
()
()
Which letter do you want to be? "X" or "O"
X
Traceback (most recent call last):
File "C:\Users\rautamiekka\Documents\_Text-based_\_Python_\ATicTacToeJPVersion.py", line 841, in <module>
start() #runs the def start()
File "C:\Users\rautamiekka\Documents\_Text-based_\_Python_\ATicTacToeJPVersion.py", line 818, in start
which = input().upper() #gets input from the player. also, the upper() means that if the player types in a 'x' (lowercase 'x'), the code will recognize it as a 'X' (capital 'X')
File "<string>", line 1, in <module>
NameError: name 'X' is not definedC:\Users\rautamiekka>python "C:\Users\rautamiekka\Documents\_Text-based_\_Python_\ATicTacToeJPVersion.py"
Hello, and welcome to Joshua Powell's version of Tic-Tac-Toe.
You shall be battling the mighty intellect of Joshua's AI Computer Programming!
Play if you dare!!!
()
()
Which letter do you want to be? "X" or "O"
O
Traceback (most recent call last):
File "C:\Users\rautamiekka\Documents\_Text-based_\_Python_\ATicTacToeJPVersion.py", line 841, in <module>
start() #runs the def start()
File "C:\Users\rautamiekka\Documents\_Text-based_\_Python_\ATicTacToeJPVersion.py", line 818, in start
which = input().upper() #gets input from the player. also, the upper() means that if the player types in a 'x' (lowercase 'x'), the code will recognize it as a 'X' (capital 'X')
File "<string>", line 1, in <module>
NameError: name 'O' is not definedC:\Users\rautamiekka>