A modern implementation of Gomoku (Five in a Row) game with an intelligent AI opponent, built using Go and the Fyne GUI toolkit.
- 🎮 Classic 15x15 Gomoku board
- 🤖 Three AI difficulty levels
- ↩️ Move undo functionality
- 🎯 Last move indicator
- 🔊 Sound effects for stone placement
- 🎨 Clean and intuitive user interface
- Focuses on defensive play
- Blocks immediate threats
- Suitable for beginners learning the game
- Prefers moves near the center and existing stones
- Balanced offensive and defensive strategy
- Looks for opportunities to create winning positions
- Actively blocks opponent's threats
- More challenging than Easy mode but still approachable
- Advanced offensive and defensive strategies
- Creates and recognizes complex threats
- Uses sophisticated position evaluation
- Suitable for experienced players
- Considers multiple factors including:
- Open fours and threes
- Double-three formations
- Strategic board positions
- Center control
- Go 1.16 or later
- Operating System: Windows, macOS, or Linux
- Graphics: Basic graphics card supporting OpenGL 2.1 or newer
brew install go gcc pkg-configsudo apt-get install golang gcc libgl1-mesa-dev xorg-dev- Install Go from https://golang.org/
- Install GCC from http://mingw-w64.org/
- Install pkgconfig from https://chocolatey.org/packages/pkgconfig
- Clone the repository:
git clone https://github.com/yourusername/simple-gomoku.git
cd simple-gomoku- Install dependencies:
go mod download- Run the game:
go run main.go- Launch the game and select your preferred AI difficulty level
- You play as Black (⚫) and move first
- Click on any intersection point to place your stone
- The AI (⚪) will automatically respond with its move
- Get five stones in a row (horizontally, vertically, or diagonally) to win
- Use the "Undo" button to take back moves
- Start a new game at any time with the "New Game" button
- Left Click: Place a stone
- Undo Button: Take back the last move (both your move and AI's response)
- New Game Button: Start a fresh game with difficulty selection
- Control the center of the board when possible
- Watch for and block your opponent's threats
- Try to create multiple threats simultaneously
- Pay attention to both offensive opportunities and defensive needs
- Avoid playing too close to the edges in the early game
Contributions are welcome! Please feel free to submit pull requests, report bugs, or suggest new features.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Fyne - Cross platform GUI toolkit
- Inspired by the traditional game of Gomoku/Five in a Row
