Skip to content

bigdragonsoft/gobang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is a console-based Gobang (Five in a Row) game program. It provides a 15x15 board, supports player vs AI gameplay with different difficulty levels for the AI. The game implements an AI decision-making system based on the minimax algorithm, featuring core game logic such as board evaluation and win/loss determination. The program offers a user-friendly command-line interface for easy operation and game viewing, aiming to provide players with an entertaining and challenging Gobang game experience.

Features

  • Two-player mode
  • Standard 15x15 game board
  • Alternating black and white stone placement
  • Automatic win/loss determination

How to Play

  1. Black stone moves first at the start of the game
  2. Players take turns placing stones on empty intersections of the board
  3. The first player to form an unbroken line of five stones horizontally, vertically, or diagonally wins
  4. If the board is filled without a winner, the game is declared a draw

Usage

Usage: gobang [option]
Options:
    -1      Start the game in player vs AI mode
    -2      Start the game in player vs player mode
    -v      Display version information
    -h      Display help information