This is a simple command-line Tic-Tac-Toe game implemented in Go using the Bubble Tea framework, along with BubbleZone for mouse controls. You can play the game in your terminal with your keyboard or mouse.
-
Clone the repository:
git clone https://github.com/your-username/tic-tac-toe.git
-
Change the directory to the project folder:
cd tic-tac-toe
-
Build and run the game:
go build ./tic-tac-toe
-
Use the following controls to play:
- Arrow keys: Move the cursor
- Enter: Place your symbol (X or O) on the selected cell
- Q: Quit the game
Alternatively, you can use your mouse to interact with the game board:
- Move your mouse cursor to select a cell.
- Left-click to place your symbol in the selected cell.
-
Win the game by getting three of your symbols in a row horizontally, vertically, or diagonally.
-
Enjoy playing Tic-Tac-Toe!
- The game is played on a 3x3 grid.
- Player X starts the game.
- Players take turns to place their symbol (X or O) on an empty cell.
- The game ends when one player wins or when the board is full (a draw).
- To win, a player must have three of their symbols in a row horizontally, vertically, or diagonally.
- If the board is full and no player has won, the game is a draw.
Keyboard Controls:
- Use arrow keys to move the cursor to select a cell.
- Press Enter to place your symbol in the selected cell.
- Press Q to quit the game at any time.
Mouse Controls (BubbleZone):
- Move your mouse cursor to select a cell.
- Left-click to place your symbol in the selected cell.
Key | Action |
---|---|
← / → | Move cursor horizontally |
↑ / ↓ | Move cursor vertically |
Enter / 🖱️ | Place symbol in selected cell |
Q | Quit the game |
- Implement AI for single-player mode
- Difficulty levels for AI
- Neural network
Enjoy the game and challenge your friends or the AI (coming soon) in this classic game of Tic-Tac-Toe!