Skip to content

HaolongChen/Gomoku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gomoku Game

This is a classic Gomoku (also known as Five in a Row) game implemented in Java with a graphical user interface (GUI) and an AI opponent.

Features

  • Graphical User Interface: The game is built with Java Swing, providing a visual and interactive game board.
  • Player vs. AI: Play against an AI opponent that uses the minimax algorithm with alpha-beta pruning to determine its moves.
  • Game Controls: A simple control panel allows you to restart the game at any time.

How to Run

  1. Prerequisites:

    • Java Development Kit (JDK) installed.
  2. Compilation: Open a terminal or command prompt, navigate to the src directory, and compile the Java files:

    javac *.java
  3. Execution: After successful compilation, run the application from the src directory:

    java App

Project Structure

The project is organized into the following Java files within the src directory:

  • App.java: The main class that launches the application.
  • GameFrame.java: The main window for the game, containing the game panel and control panel.
  • GamePanel.java: The panel that displays the Gomoku board and handles player input.
  • ControlPanel.java: The panel with game controls, such as a "Restart" button.
  • AI.java: Implements the logic for the computer opponent, using an AI algorithm to make intelligent moves.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages