TicTacToe in Python Programming Language! with new rules!
This is a two-player game of TicTacToe where players can adjust the size of the board!
- Each player will take turns to put the symbol in the correct tiles!
- Every turn, players must each put two adjacent symbols into the board.
- The winner is the one with the most tiles when the game ends (no adjacent tiles to be inserted with the symbol).
- It will be a draw if no adjacent tiles to be inserted with the symbol but both players have the same number of symbols.
- Enjoy!
Examples of how the game is played:
Enter player 1 name: Bryan
Enter player 2 name: Oliver
Size of game ticTacToeBoard: 5
0 1 2 3 4
0 - - - - -
1 - - - - -
2 - - - - -
3 - - - - -
4 - - - - -
Bryan, place your X tile: 00 01
0 1 2 3 4
0 X X - - -
1 - - - - -
2 - - - - -
3 - - - - -
4 - - - - -
Oliver, place your O tile: 12 22
0 1 2 3 4
0 X X - - -
1 - - O - -
2 - - O - -
3 - - - - -
4 - - - - -
Bryan, place your X tile: 10 11
0 1 2 3 4
0 X X - - -
1 X X O - -
2 - - O - -
3 - - - - -
4 - - - - -
Oliver, place your O tile: 21 31
0 1 2 3 4
0 X X - - -
1 X X O - -
2 - O O - -
3 - O - - -
4 - - - - -
Bryan, place your X tile: 30 45
Wrong tile coordinates!! Please re-enter
Bryan, place your X tile: 30 40
0 1 2 3 4
0 X X - - -
1 X X O - -
2 - O O - -
3 X O - - -
4 X - - - -
Oliver, place your O tile: 42 43
0 1 2 3 4
0 X X - - -
1 X X O - -
2 - O O - -
3 X O - - -
4 X - O O -
Bryan, place your X tile: 03 13
0 1 2 3 4
0 X X - X -
1 X X O X -
2 - O O - -
3 X O - - -
4 X - O O -
Oliver, place your O tile: 33 34
0 1 2 3 4
0 X X - X -
1 X X O X -
2 - O O - -
3 X O - O O
4 X - O O -
Bryan, place your X tile: 14 24
0 1 2 3 4
0 X X - X -
1 X X O X X
2 - O O - X
3 X O - O O
4 X - O O -
Bryan 10 - Oliver 8
Bryan is the winner!!