aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQiang Guo <guoqiang_cn@126.com>2024-09-20 14:42:09 +0000
committerRobert Clausecker <fuz@FreeBSD.org>2024-09-25 06:28:03 +0000
commit312e909f61fa1f7533af565e4f6f09b5f6240510 (patch)
tree27af4094b3ee5a1fae301136f5cc08b7824db45a
parent5ea82036cc59224c8ab7553764f49e2c88fc5b98 (diff)
games/gobang: console-based Gobang game
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. - Two-player mode - Standard 15x15 game board - Alternating black and white stone placement - Automatic win/loss determination WWW: https://github.com/bigdragonsoft/gobang PR: 281527 Event: EuroBSDcon 2024
-rw-r--r--games/Makefile1
-rw-r--r--games/gobang/Makefile25
-rw-r--r--games/gobang/distinfo3
-rw-r--r--games/gobang/pkg-descr13
4 files changed, 42 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index bb88fc450fe4..6c1abc1b8d67 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -356,6 +356,7 @@
SUBDIR += gnushogi
SUBDIR += gnustep-ladder
SUBDIR += gnustep-sudoku
+ SUBDIR += gobang
SUBDIR += gogrepo
SUBDIR += gogui
SUBDIR += golddig
diff --git a/games/gobang/Makefile b/games/gobang/Makefile
new file mode 100644
index 000000000000..6fed86d28118
--- /dev/null
+++ b/games/gobang/Makefile
@@ -0,0 +1,25 @@
+PORTNAME= gobang
+DISTVERSION= 0.1
+CATEGORIES= games
+
+MAINTAINER= guoqiang_cn@126.com
+COMMENT= This is a Gobang game that runs in the console
+WWW= https://github.com/bigdragonsoft/gobang
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USE_GITHUB= yes
+GH_ACCOUNT= bigdragonsoft
+
+CFLAGS+= -std=c99
+
+PLIST_FILES= bin/gobang
+
+do-build:
+ ${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -o ${WRKSRC}/gobang ${WRKSRC}/gobang.c ${LIBS}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/gobang ${STAGEDIR}${PREFIX}/bin/
+
+.include <bsd.port.mk>
diff --git a/games/gobang/distinfo b/games/gobang/distinfo
new file mode 100644
index 000000000000..314201f23f52
--- /dev/null
+++ b/games/gobang/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1726437465
+SHA256 (bigdragonsoft-gobang-0.1_GH0.tar.gz) = 7cda1b6c8ba1c89cc468234b2a0e51e79af694bcb84147c2011d29560a50a1ef
+SIZE (bigdragonsoft-gobang-0.1_GH0.tar.gz) = 5775
diff --git a/games/gobang/pkg-descr b/games/gobang/pkg-descr
new file mode 100644
index 000000000000..8a9017255e03
--- /dev/null
+++ b/games/gobang/pkg-descr
@@ -0,0 +1,13 @@
+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.
+
+- Two-player mode
+- Standard 15x15 game board
+- Alternating black and white stone placement
+- Automatic win/loss determination