0

Please suggest me how to go for the TIC-TAC-TOE game code in python , I am at an intermediate level

25th May 2020, 9:31 PM
Shivangi Agarwal
6 Réponses
+ 1
Make the shape of the board and then a function that prints it. Then make the main function, that takes the input from the player and checks if the input is a valid move or not. And if the block that player requests to move to is valid, fill that block if it's not valid ask the user to choose another block
25th May 2020, 9:35 PM
Kirill
Kirill - avatar
+ 1
GUI is not required for such a simple game, the state can be printed using X and O and input taken as 'coordinates' like for chess. Much easier to start. Algorithm first.
25th May 2020, 9:48 PM
Sandra Meyer
Sandra Meyer - avatar
+ 1
Thanks Kirill Vidov as well as Mirielle
25th May 2020, 9:49 PM
Shivangi Agarwal
+ 1
You have to implement one!
25th May 2020, 9:59 PM
Sandra Meyer
Sandra Meyer - avatar
+ 1
I have just made it a week ago.But I made it using pygame but you can just make a function to draw the board based on a list that will be empty then you'll fill it based on the user inputs(that will be the position of the cell they choose like from 1 to 9) and you have to check everytime if the user wins or he had a tie. NOTE: you have to decide first of all if your game is gonna be against the computer or two users playing against each other.
27th May 2020, 11:47 AM
Taha Lyousfi
0
Sandra Meyer Which algorithm should I refer to?
25th May 2020, 9:49 PM
Shivangi Agarwal