An Interest In:
Web News this Week
- April 19, 2024
- April 18, 2024
- April 17, 2024
- April 16, 2024
- April 15, 2024
- April 14, 2024
- April 13, 2024
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
Original Link: https://dev.to/xarop_pa_toss/ye-olde-tictactoe-fo3
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To