refactor(config): 更新时间限制为30分钟并调整配置文件存储格式

refactor(globals): 移除不必要的GUI运行状态标志
refactor(gui): 更新注释以反映使用IUP库
refactor(ai): 修改威胁检测逻辑以提升威胁等级
refactor(config): 修改加载和保存配置的时间限制逻辑
refactor(network): 更新默认网络端口常量
refactor(record): 移除冗余注释并增强复盘步骤的合法性检查
This commit is contained in:
2026-05-02 12:24:27 +08:00
parent 249dc2ab4b
commit f897536a45
12 changed files with 29 additions and 83 deletions
+3 -39
View File
@@ -1,9 +1,8 @@
/**
* @file gui.h
* @brief 图形化用户界面头文件
* @note 使用Raylib库实现五子棋的图形化界面
* @note 使用IUP库实现五子棋的图形化界面
* @author 刘航宇
* @date 2025-01-15
*/
#ifndef GUI_H
@@ -17,45 +16,16 @@
/**
* @brief 初始化GUI
* @details 初始化Raylib图形库和游戏界面组件
* @details 初始化IUP图形库和游戏界面组件
* @return 成功返回0,失败返回-1
*/
int init_gui();
/**
* @brief 清理GUI资源
* @details 关闭窗口
*/
void cleanup_gui();
/**
* @brief 渲染游戏画面
* @details 完整的游戏画面渲染流程
*/
void render_game();
/**
* @brief 处理事件
* @details 处理所有Raylib事件并执行相应操作
* @return 继续运行返回1,退出返回0
*/
int handle_events();
/**
* @brief 绘制棋盘
*/
void draw_board();
/**
* @brief 绘制棋子
*/
void draw_stones();
/**
* @brief 绘制UI元素
*/
void draw_ui_elements();
/**
* @brief 屏幕坐标转棋盘坐标
*/
@@ -81,16 +51,10 @@ void start_pve_game_gui();
*/
void start_replay_gui();
/**
* @brief 启动图形化界面模式
* @note 替代原来的 main 函数中的 GUI 分支逻辑
*/
int init_gui(); // Already declared
/**
* @brief 运行图形化界面模式
* @details 主循环处理事件、渲染画面和更新状态
*/
void run_gui_mode();
#endif // GUI_H
#endif // GUI_H