Skip to content
← Back to Community
COM Opponent Tic-tac-toe in Pygame
Profile icon
napp

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
Profile icon
JituSa
Profile icon
aakanshasingh2
Profile icon
napp
Comments
hotnewtop
Profile icon
napp

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!