代码格式化和优化:统一换行符格式,优化代码结构

This commit is contained in:
2025-07-23 10:09:02 +08:00
parent fbe4f5273c
commit cb81105809
13 changed files with 57 additions and 6 deletions
+9
View File
@@ -1,3 +1,12 @@
/**
* @file ai.c
* @note 本文件定义了AI模块的函数和变量
* @note 包括:
* 1. 评估一个落子位置的综合得分(结合进攻和防守)
* 2. 评估指定位置的价值
* 3. 评估棋盘价值
*/
#include "gobang.h" #include "gobang.h"
#include "ai.h" #include "ai.h"
#include "config.h" #include "config.h"
+1
View File
@@ -6,6 +6,7 @@
* 2. 评估指定位置的价值 * 2. 评估指定位置的价值
* 3. 评估棋盘价值 * 3. 评估棋盘价值
*/ */
#ifndef AI_H #ifndef AI_H
#define AI_H #define AI_H
+6
View File
@@ -1,3 +1,9 @@
/**
* @file config.c
* @brief 五子棋游戏参数配置源文件
* @note 本文件集中定义了五子棋游戏的所有参数配置,便于统一管理和修改
*/
#include "config.h" #include "config.h"
#include "ui.h" #include "ui.h"
#include "game_mode.h" #include "game_mode.h"
+10
View File
@@ -1,3 +1,13 @@
/**
* @file game_mode.c
* @brief 五子棋游戏框架源文件
* @note 本文件定义了五子棋游戏的四种主要模式:
* 1. AI对战模式
* 2. 双人对战模式
* 3. 网络对战模式
* 4. 复盘模式
*/
#include "game_mode.h" #include "game_mode.h"
#include "init_board.h" #include "init_board.h"
#include "gobang.h" #include "gobang.h"
-2
View File
@@ -2,8 +2,6 @@
* @file globals.c * @file globals.c
* @author (3364451258@qq.com15236416560@163.comlhy3364451258@outlook.com) * @author (3364451258@qq.com15236416560@163.comlhy3364451258@outlook.com)
* @brief * @brief
* @version 6.0
* @date 2025-07-10
* @note * @note
*/ */
+7
View File
@@ -1,3 +1,10 @@
/**
* @file gobang.c
* @brief
* @note
* AI决策等功能
*/
#include "game_mode.h" #include "game_mode.h"
#include "init_board.h" #include "init_board.h"
#include "gobang.h" #include "gobang.h"
+1
View File
@@ -4,6 +4,7 @@
* @note * @note
* AI决策等功能 * AI决策等功能
*/ */
#ifndef GO_BANG_H #ifndef GO_BANG_H
#define GO_BANG_H #define GO_BANG_H
+7
View File
@@ -1,3 +1,10 @@
/**
* @file init_board.c
* @brief
* @note
*
*/
#include "init_board.h" #include "init_board.h"
#include "gobang.h" #include "gobang.h"
#include "game_mode.h" #include "game_mode.h"
+1
View File
@@ -4,6 +4,7 @@
* @note * @note
* *
*/ */
#ifndef INIT_BOARD_H #ifndef INIT_BOARD_H
#define INIT_BOARD_H #define INIT_BOARD_H
-4
View File
@@ -2,10 +2,6 @@
* @file network.c * @file network.c
* @author (3364451258@qq.com15236416560@163.comlhy3364451258@outlook.com) * @author (3364451258@qq.com15236416560@163.comlhy3364451258@outlook.com)
* @brief * @brief
* @version 6.0
* @date 2025-07-10
*
* @copyright Copyright (c) 2025
*/ */
#include "network.h" #include "network.h"
+7
View File
@@ -1,3 +1,10 @@
/**
* @file record.c
* @brief
* @note
*
*/
#include "record.h" #include "record.h"
#include "game_mode.h" #include "game_mode.h"
#include "gobang.h" #include "gobang.h"
+7
View File
@@ -1,3 +1,10 @@
/**
* @file ui.c
* @brief
* @note
*
*/
#include "ui.h" #include "ui.h"
#include "gobang.h" #include "gobang.h"
#include "config.h" #include "config.h"
+1
View File
@@ -4,6 +4,7 @@
* @note * @note
* *
*/ */
#ifndef UI_H #ifndef UI_H
#define UI_H #define UI_H