diff --git a/ai.c b/ai.c index 55fb134..e400f41 100644 --- a/ai.c +++ b/ai.c @@ -1,3 +1,12 @@ +/** + * @file ai.c + * @note 本文件定义了AI模块的函数和变量 + * @note 包括: + * 1. 评估一个落子位置的综合得分(结合进攻和防守) + * 2. 评估指定位置的价值 + * 3. 评估棋盘价值 + */ + #include "gobang.h" #include "ai.h" #include "config.h" diff --git a/ai.h b/ai.h index e1ce5ea..adf8bfb 100644 --- a/ai.h +++ b/ai.h @@ -6,6 +6,7 @@ * 2. 评估指定位置的价值 * 3. 评估棋盘价值 */ + #ifndef AI_H #define AI_H diff --git a/config.c b/config.c index 1bd9013..202f80b 100644 --- a/config.c +++ b/config.c @@ -1,3 +1,9 @@ +/** + * @file config.c + * @brief 五子棋游戏参数配置源文件 + * @note 本文件集中定义了五子棋游戏的所有参数配置,便于统一管理和修改 + */ + #include "config.h" #include "ui.h" #include "game_mode.h" diff --git a/game_mode.c b/game_mode.c index 9373821..fbb9be7 100644 --- a/game_mode.c +++ b/game_mode.c @@ -1,3 +1,13 @@ +/** + * @file game_mode.c + * @brief 五子棋游戏框架源文件 + * @note 本文件定义了五子棋游戏的四种主要模式: + * 1. AI对战模式 + * 2. 双人对战模式 + * 3. 网络对战模式 + * 4. 复盘模式 + */ + #include "game_mode.h" #include "init_board.h" #include "gobang.h" diff --git a/globals.c b/globals.c index c053907..7f5af34 100644 --- a/globals.c +++ b/globals.c @@ -2,8 +2,6 @@ * @file globals.c * @author 刘航宇(3364451258@qq.com、15236416560@163.com、lhy3364451258@outlook.com) * @brief 全局变量定义和初始化文件 - * @version 6.0 - * @date 2025-07-10 * @note 集中管理所有全局变量的定义和初始化,提高代码可维护性 */ diff --git a/gobang.c b/gobang.c index 48c6efe..6e1791e 100644 --- a/gobang.c +++ b/gobang.c @@ -1,3 +1,10 @@ +/** + * @file gobang.c + * @brief 五子棋游戏源文件 + * @note 本文件定义了五子棋游戏的主要数据结构、函数和全局变量。 + * 它包含了游戏棋盘的表示、玩家操作、规则检查以及AI决策等功能。 + */ + #include "game_mode.h" #include "init_board.h" #include "gobang.h" diff --git a/gobang.h b/gobang.h index 266d208..681ee58 100644 --- a/gobang.h +++ b/gobang.h @@ -4,6 +4,7 @@ * @note 本文件定义了五子棋游戏的主要数据结构、函数和全局变量。 * 它包含了游戏棋盘的表示、玩家操作、规则检查以及AI决策等功能。 */ + #ifndef GO_BANG_H #define GO_BANG_H diff --git a/init_board.c b/init_board.c index 465e03c..c2cdfa9 100644 --- a/init_board.c +++ b/init_board.c @@ -1,3 +1,10 @@ +/** + * @file init_board.c + * @brief 初始化游戏棋盘源文件 + * @note 本文件定义了初始化游戏棋盘的相关函数。 + * 它负责设置游戏的初始状态,包括棋盘大小、玩家标识、游戏规则等。 + */ + #include "init_board.h" #include "gobang.h" #include "game_mode.h" diff --git a/init_board.h b/init_board.h index 0030578..dd81706 100644 --- a/init_board.h +++ b/init_board.h @@ -4,6 +4,7 @@ * @note 本文件定义了初始化游戏棋盘的相关函数和全局变量。 * 它负责设置游戏的初始状态,包括棋盘大小、玩家标识、游戏规则等。 */ + #ifndef INIT_BOARD_H #define INIT_BOARD_H diff --git a/network.c b/network.c index a5e4f77..e82386d 100644 --- a/network.c +++ b/network.c @@ -2,10 +2,6 @@ * @file network.c * @author 刘航宇(3364451258@qq.com、15236416560@163.com、lhy3364451258@outlook.com) * @brief 五子棋网络对战模块实现 - * @version 6.0 - * @date 2025-07-10 - * - * @copyright Copyright (c) 2025 */ #include "network.h" diff --git a/record.c b/record.c index 5732280..d19bba5 100644 --- a/record.c +++ b/record.c @@ -1,3 +1,10 @@ +/** + * @file record.c + * @brief 游戏复盘与记录源文件 + * @note 本文件定义了游戏复盘与记录相关的函数和数据结构。 + * 它负责管理游戏的历史记录、加载和保存游戏文件、计算游戏评分等功能。 + */ + #include "record.h" #include "game_mode.h" #include "gobang.h" diff --git a/ui.c b/ui.c index a0301ca..b75c1bf 100644 --- a/ui.c +++ b/ui.c @@ -1,3 +1,10 @@ +/** + * @file ui.c + * @brief + * @note 本文件定义了用户界面相关的函数和数据结构。 + * 它负责处理用户输入、显示游戏界面、提示信息等与用户交互的功能。 + */ + #include "ui.h" #include "gobang.h" #include "config.h" diff --git a/ui.h b/ui.h index d0581c7..da26b1f 100644 --- a/ui.h +++ b/ui.h @@ -4,6 +4,7 @@ * @note 本文件定义了用户界面相关的函数和数据结构。 * 它负责处理用户输入、显示游戏界面、提示信息等与用户交互的功能。 */ + #ifndef UI_H #define UI_H