mirror of
https://github.com/LHY0125/Gobang-Game.git
synced 2026-05-10 02:19:46 +08:00
feat: 添加Makefile编译系统和BUILD文档
- 创建完整的Makefile支持make编译 - 支持编译控制台版本和GUI版本 - 添加清理、运行、帮助等目标 - 自动处理SDL3和网络库依赖 - 创建BUILD.md编译指南文档 - 完善GUI相关全局变量管理 - 丰富函数注释和文档
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "globals.h"
|
||||
#include "config.h"
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
// ==================== 游戏核心变量定义 ====================
|
||||
int BOARD_SIZE = DEFAULT_BOARD_SIZE; // 实际使用的棋盘尺寸
|
||||
@@ -28,6 +29,14 @@ double defense_coefficient = DEFAULT_DEFENSE_COEFFICIENT; // 防守系数
|
||||
// ==================== 网络相关变量定义 ====================
|
||||
NetworkGameState network_state = {0}; // 网络游戏状态
|
||||
|
||||
// ==================== GUI相关变量定义 ====================
|
||||
SDL_Window* window = NULL; // SDL窗口指针
|
||||
SDL_Renderer* renderer = NULL; // SDL渲染器指针
|
||||
int gui_running = 1; // GUI运行状态标志
|
||||
int current_player_gui = PLAYER; // GUI当前玩家
|
||||
int game_over = 0; // 游戏结束标志
|
||||
char status_message[256] = "五子棋游戏 - 黑子先行"; // 状态消息
|
||||
|
||||
// ==================== 记录相关变量定义 ====================
|
||||
int player1_final_score = 0; // 玩家1最终得分
|
||||
int player2_final_score = 0; // 玩家2最终得分
|
||||
|
||||
Reference in New Issue
Block a user