© Sloan Kelly  2019
Sloan KellyPython, PyGame, and Raspberry Pi Game Developmenthttps://doi.org/10.1007/978-1-4842-4533-0_8

8. Putting It Together: Tic-Tac-Toe

Sloan Kelly1 
(1)
Niagara Falls, ON, Canada
 

Before we start looking at PyGame and how to create arcade-style games we should take a step back and put what we’ve covered in the first few chapters into a simple ASCII console game of Tic-Tac-Toe – a game for two players.

The Rules

For those of you who haven’t played Tic-Tac-Toe before, here are the rules:

Draw a board on a piece of paper with nine squares, people usually do this by drawing two horizontal lines parallel to each other followed by two vertical lines parallel to each other but perpendicular to the horizontal lines like a hash symbol: ...

Get Python, PyGame, and Raspberry Pi Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.