Skip to content

bbae0312/Gomoku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gomoku Game

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.

Table of Contents

Installation

To play the Gomoku game, follow these steps:

  1. Clone this repository to your local machine:

    git clone https://github.com/yourusername/gomoku.git
  2. Navigate to the project directory:

    cd gomoku

Requirements

  • Python 3.x
  • Pygame: You can install Pygame via pip:
    pip install pygame

Quick Start

Follow these simple steps to get the Gomoku game up and running on your local machine:

  1. Make sure you have Python 3.x installed. If not, download and install it from python.org.

  2. Ensure Pygame is installed:

    pip install pygame
  3. Clone the repository:

    git clone https://github.com/yourusername/gomoku.git
  4. Navigate to the project directory:

    cd gomoku
  5. Run the game:

    python main.py

The game window will open, and you can start playing immediately.

How to Play

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:

  1. Start the Game: Run main.py to start the game. The game board will appear with a 19x19 grid.

  2. Place a Stone: Click on an intersection of lines on the board to place your stone. The black player goes first.

  3. Take Turns: Players take turns placing one stone on the board per turn.

  4. 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!

Game Rules

  1. First Turn: Black plays first.

  2. One Stone per Turn: Players can only place one stone on the board per turn.

  3. Winning: To win, a player must get five of their own stones in a row, either horizontally, vertically, or diagonally.

  4. No Overlines: Getting more than five stones in a row does not count as a win.

  5. Draw: If the board is filled and neither player has five in a row, the game is a draw.

  6. Respect and Fair Play: Please be respectful to your opponent and play fairly. Enjoy the game!

Contributing

Contributions to improve the Gomoku game are welcome. Here’s how you can help:

  1. Fork the Repository: Click the 'Fork' button at the top right of this page to create your own copy of the repository.

  2. Clone Your Fork: Clone your fork to your local machine:

    git clone https://github.com/yourusername/gomoku.git
  3. Create a New Branch: Create a branch for your changes:

    git checkout -b feature-branch-name
  4. Make Your Changes: Add or edit files as necessary for your contribution.

  5. Commit Your Changes: Commit your changes with a descriptive commit message:

    git commit -am 'Add some feature or fix'
  6. Push to GitHub: Push your changes to your fork on GitHub:

    git push origin feature-branch-name
  7. Submit a Pull Request: Go to your fork on GitHub and click the 'Pull request' button to submit your changes for review.

  8. Wait for Review: Maintainers will review your changes and merge them into the main project or provide feedback.

  9. Congratulations: Congratulations, you’ve just contributed to the Gomoku game!

License

License

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages