Gomoku is a board game where two players take turns placing a stone of their color on an empty intersection. The winner is the first player to get an unbroken row of five stones horizontally, vertically, or diagonally.
To play the Gomoku game, follow these steps:
-
Clone this repository to your local machine:
git clone https://github.com/yourusername/gomoku.git
-
Navigate to the project directory:
cd gomoku
- Python 3.x
- Pygame: You can install Pygame via pip:
pip install pygame
Follow these simple steps to get the Gomoku game up and running on your local machine:
-
Make sure you have Python 3.x installed. If not, download and install it from python.org.
-
Ensure Pygame is installed:
pip install pygame
-
Clone the repository:
git clone https://github.com/yourusername/gomoku.git
-
Navigate to the project directory:
cd gomoku -
Run the game:
python main.py
The game window will open, and you can start playing immediately.
Gomoku is a two-player strategy game played on a 19x19 board. The goal is to get five of your stones in a row before your opponent does. Here’s how to play:
-
Start the Game: Run
main.pyto start the game. The game board will appear with a 19x19 grid. -
Place a Stone: Click on an intersection of lines on the board to place your stone. The black player goes first.
-
Take Turns: Players take turns placing one stone on the board per turn.
-
Win the Game: The first player to get five of their stones in a row (horizontally, vertically, or diagonally) wins the game.
Enjoy the game and may the best player win!
-
First Turn: Black plays first.
-
One Stone per Turn: Players can only place one stone on the board per turn.
-
Winning: To win, a player must get five of their own stones in a row, either horizontally, vertically, or diagonally.
-
No Overlines: Getting more than five stones in a row does not count as a win.
-
Draw: If the board is filled and neither player has five in a row, the game is a draw.
-
Respect and Fair Play: Please be respectful to your opponent and play fairly. Enjoy the game!
Contributions to improve the Gomoku game are welcome. Here’s how you can help:
-
Fork the Repository: Click the 'Fork' button at the top right of this page to create your own copy of the repository.
-
Clone Your Fork: Clone your fork to your local machine:
git clone https://github.com/yourusername/gomoku.git
-
Create a New Branch: Create a branch for your changes:
git checkout -b feature-branch-name
-
Make Your Changes: Add or edit files as necessary for your contribution.
-
Commit Your Changes: Commit your changes with a descriptive commit message:
git commit -am 'Add some feature or fix' -
Push to GitHub: Push your changes to your fork on GitHub:
git push origin feature-branch-name
-
Submit a Pull Request: Go to your fork on GitHub and click the 'Pull request' button to submit your changes for review.
-
Wait for Review: Maintainers will review your changes and merge them into the main project or provide feedback.
-
Congratulations: Congratulations, you’ve just contributed to the Gomoku game!
This project is licensed under the MIT License - see the LICENSE.md file for details.
The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology. It allows users to do anything they want with the code, as long as they include the original copyright and license notice in any copy of the software or substantial portion of it.