0
Please suggest me how to go for the TIC-TAC-TOE game code in python , I am at an intermediate level
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
+ 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.
+ 1
Thanks Kirill Vidov as well as Mirielle
+ 1
You have to implement one!
+ 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.
0
Sandra Meyer Which algorithm should I refer to?