This is just a simple Tic Tac Toe algorithm I programmed using python. 

Here are the basic rules of Tic Tac Toe:

  1. Objective: The objective of Tic Tac Toe is to be the first player to form a horizontal, vertical, or diagonal line of three of your marks ("X" or "O") on the grid.
  2. Setup: The game begins with an empty 3x3 grid.
  3. Players: Tic Tac Toe is a two-player game. One player is assigned "X" and the other player is assigned "O".
  4. Turns: Players take turns placing their marks ("X" or "O") on the empty spaces of the grid, one at a time.
  5. Gameplay:
    • The player assigned "X" typically goes first, followed by the player assigned "O".
    • Players place their mark in an empty square of the grid.
    • Once a mark is placed, it cannot be moved.
  6. Winning: The game ends when one of the following conditions is met:
    • One player successfully forms a horizontal, vertical, or diagonal line of three of their marks.
    • All squares of the grid are filled, resulting in a tie.
  7. Horizontal, Vertical, and Diagonal Lines: A player wins by placing their mark in a way that creates a continuous line of three of their marks in a horizontal, vertical, or diagonal direction.
  8. End of Game:
    • If a player wins, the game is over, and that player is declared the winner.
    • If all squares are filled without any player achieving a winning line, the game is a draw.
  9. Restarting the Game: After the game ends (either in a win or a draw), players may choose to play again by resetting the grid to its initial empty state and starting a new game.

Leave a comment

Log in with itch.io to leave a comment.