A simple 2D Tic Tac Toe game built using Gosu, a 2D game development library for Ruby and C++.
Before running the game, make sure you have installed the Gosu gem:
gem install gosu
Then you can clone this repository and run the game:
git clone https://github.com/username/repo.git
cd repo
ruby game.rb
- Left-click on the grid to place your symbol ('X').
- The bot plays automatically as 'O' using a minimax algorithm for optimal moves.
- After a game is over, press the space bar to restart the game.
- The game starts with 'X'.
- Players alternate turns.
- The first player to get 3 of their marks in a row (up, down, across, or diagonally) is the winner.
- When all 9 squares are full, the game is over.
Enjoy the game!