Share your repls and programming experiences

← Back to all posts
COM Opponent Tic-tac-toe in Pygame
napp (1)

A game of tic-tac-toe made in Pygame, perhaps a bit over-engineered and under-optimized, but I'm happy enough with it. Pick x or o, the COM gets the other, and play a game! If you click "again," the values are reset to default and it restarts.

This took maybe 6 total hours of work, and is my first real experience with Pygame, on top of not being super experience with Python (more so C++), so please comment any tips or criticisms!

Voters
napp (1)
Commentshotnewtop
napp (1)

Just tweaked the COM to prioritize filling the middle slot if it is open, which also had a side effect of very slightly simplifying the end of the COM function!