DEV Community

Cover image for Ye Olde TicTacToe
Ricardo Giro
Ricardo Giro

Posted on

Ye Olde TicTacToe

It is time. Time for the one of the greatest rites of passage of all time... Programming Tic Tac Toe.

I've been going through the great Edube Interactive Python beginner course and I was sort of expecting it to show up at some point.
They restricted my moves a bit by setting up some functions beforehand; I didn't see the use in a couple of them at the start but since they were there, I tried to incorporate them into my solution. It made the whole thing even more fun :)

I already programmed ConnectFour before so this, although still a challenge, wasn't completely new.
I coded the whole thing in about 3 hours but I have to say, it's probably some of the sloppiest code I've ever written. It really drives home the need to learn best practices from the start, which is harder than you'd give it credit to be honest. Lots of good tutorials on how to code, but learning best practices requires a non-basic knowledge of whatever you're learning.
But all in due time.

Do you remember when you first programmed Tic Tac Toe? What challenged you the most? =D

Top comments (0)