Share your repls and programming experiences

← Back to all posts
Noughts and Crosses vs AI
henryeth (184)

My Second Project

This is my second Python project - a step up from the previous Rock Paper Scissors in the classic games category. This time I have simplified it to minimal(-ish) lines of code and the game works flawlessly (I think). The AI is quite basic, but it is good enough for noughts and crosses.

Comments
hotnewtop
LD1 (53)

I think that the design could be improved (the way it displays the board). The O's look a lot like 0's (Zeros). Maybe you could have underscores for empty spaces, then the user chooses the Column and row to place there char. It would also be cool if you could choose to be first or second (but that might be problematic for your AI). You can see how I did it here

henryeth (184)

@LD1 Your version is genuinely impossible to beat.

LD1 (53)

I beat it - On my first try -- Nice job though! I never though tictactoe could be code in 32 lines

henryeth (184)

@LD1 It is very easy to beat - I could make it impossible to beat but I didn't want to.

henryeth (184)

@henryeth First try though is good