Gomoku is a strategy board game typically played with Go pieces on a Go board. Two players take turns placing stones on a grid, aiming to align five stones in a row (horizontally, vertically, or diagonally). The board size is typically 15 x 15, but any size (above 5 obviously) is playable. This Python implementation includes an interactive board that allows players to click to place their stones.
After cloning the repository:
cd gomoku
pip install -r requirements.txt
- Run the script:
python play_gomoku.py
- Take turns clicking on the desired fields to place stones.
ctrl-c
in the terminal to end the game.
You can customize the board size in play_gomoku.py
:
board_size = 10
- Player X always starts first.
- Players alternate turns by clicking on the desired cell to place their stone.
- The game ends when a player aligns five stones in a row or all cells are filled.
You can adjust the following settings in the play_gomoku.py
:
- Board Size: Change the
board_size
variable to customize the size of the grid.
This project is licensed under the MIT License. See the LICENSE file for details.