Tic Tac Toe wuth Python !
27/06/2020
Our mission was to code a game in Python. So we chose to make a tic-tac-toe. For this, we coded on the PyCharm software.
Rules :
Two players face each other, each with either a cross or a round their goal and align the counters vertically,
horizontally or diagonally. The player who succeeds wins the game, otherwise it's a draw!
Specification :
-
The game of tic-tac-toe, 1 vs 1, one human user against another human user.
-
Creation of the grid, 3x3 therefore in total 9 boxes available.
-
Define the number of joeurs that can play, at home it will be 2. Then, determine the turn of each player, it will be in turn.
-
To choose its box, the user will have to choose the column number then the number of the line. Its symbol (either X or O) will be written on this case.
-
By default player 1 will have the X sign and player 2 will have the O sign.
-
All possibilities are listed where a user can win, i.e.
8 possibilities: -
1 1
-
2 2
-
3 3
-
1 1 1
-
2 2 2
-
3 3 3
-
1 1 1
-
3 3 3
7) We list the possibilities where the match is null, that is to say when no user has placed the 8 possibilities.
8) Finally, display the result at the end of the game.
Download Brickit and send me a message, I will answer you with joy !
- Linkedin : Nathan Journo
- Linkedin : Nouheila Bat
- Linkedin : Amanda Elfassi