Share your repls and programming experiences

← Back to all posts
Tic Tac Toe (2 player)
Uzalii (437)

This is Tic Tac Toe made on python it is 2 players only, Comment down below if there are any problems with the code. This took me a lot of time so i would really appreciate Upvotes. Thx to everyone who has Upvoted me so far. Enjoy!

Commentshotnewtop
ChanceDeas (4)

Great program, possibly make it so that it doesn't skip a turn when the player doesn't use between numbers 1-9 and make it so that the choice isn't overridden if the players pick the same number.

MoltasDev (10)

Wonderfull code, well done!

yahyazkh (4)

Hey great effort
I think you just have to fix the overwriting issue
Because what is happening is when you save loc1 if its player number 2 turn
he just can simply replace the value of loc1 and nothing happen
so if you want to make it more realistic just fix this and good luck

Uzalii (437)

@yahyazkh i will try this on the cpu version i am working on

taylordhill (4)

Really great coding sir! one thing you can do to make the experience better is to, add a couple features that make your game stand out more then other peoples,just some advice from me!Upvoted

Uzalii (437)

Thx bro and good suggestion

AnishGupta (2)

The code is really great! I made it so that it matches my numbers on the side, like a replica of the board. like this 7 8 9
4 5 6
1 2 3
Its just a great code, I played it like at least 50 times, I think i broke my run button but its ok ;). You got my upvote

Uzalii (437)

Thx so much man this helps a lot and thx for the upvote

SamuelClarke (3)

I found a glitch. If you get cats you can replace another square and win.

JamesSanchez (1)

You should make a cpu player

Uzalii (437)

@JamesSanchez I am not sure if I have the time for that but I will try

SamuelClarke (3)

I respect your ability to code as well as you can. I still prefer python.

Uzalii (437)

@SamuelClarke This is Python and did you Upvote

SamuelClarke (3)

@Uzalii Yar! And I'm not used to this format. Sorry...

Uzalii (437)

Did you remember to Upvote

gatorade322 (58)

why, does it just ask player two, player one forever?!?

Uzalii (437)

@gatorade322 it doesn't when a player gets 3 in a row the game ends it shows the final board and the code the script ends

8D_Joe_Efretuei (74)

Btw player 2 never seems to win

Uzalii (437)

@8D_Joe_Efretuei thx for telling me try it now

8D_Joe_Efretuei (74)

Nice bro i am sorry i posted your code it was accident. wont happen again

Uzalii (437)

Remember to Upvote

Uzalii (437)

And i hope you did enjoy the code

8D_Joe_Efretuei (74)

@Uzalii yes the code is very good and i Upvoted