mirror of
https://github.com/zhenyan121/SporeBG-Conid.git
synced 2026-04-10 14:24:10 +08:00
Update structure information
This commit is contained in:
@@ -14,19 +14,21 @@ add_subdirectory(third_party/SDL3)
|
|||||||
|
|
||||||
set(SOURCE_FILES
|
set(SOURCE_FILES
|
||||||
src/main.cpp
|
src/main.cpp
|
||||||
src/core/Game.cpp
|
src/core/GameApplication.cpp
|
||||||
src/ui/Render.cpp
|
src/game/GameSession.cpp
|
||||||
src/core/Board.cpp
|
src/game/Board.cpp
|
||||||
src/core/Piece.cpp
|
src/game/Piece.cpp
|
||||||
src/core/Rule.cpp
|
src/game/Rule.cpp
|
||||||
src/core/ComponentManager.cpp
|
src/game/ComponentManager.cpp
|
||||||
src/input/InputManager.cpp
|
src/input/InputManager.cpp
|
||||||
|
src/core/WindowManager.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
# 添加可执行文件
|
# 添加可执行文件
|
||||||
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
|
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
|
||||||
|
|
||||||
target_include_directories(SporeBG-Conid PRIVATE ${CMAKE_SOURCE_DIR}/src)
|
target_include_directories(SporeBG-Conid PRIVATE
|
||||||
|
${CMAKE_SOURCE_DIR}/src)
|
||||||
# 使用正确的目标名称链接SDL3
|
# 使用正确的目标名称链接SDL3
|
||||||
# 方法1:使用别名(推荐)
|
# 方法1:使用别名(推荐)
|
||||||
target_link_libraries(SporeBG-Conid PRIVATE SDL3::SDL3)
|
target_link_libraries(SporeBG-Conid PRIVATE SDL3::SDL3)
|
||||||
|
|||||||
39
README.md
39
README.md
@@ -12,38 +12,21 @@ ninja
|
|||||||
```
|
```
|
||||||
## 项目结构
|
## 项目结构
|
||||||
```bash
|
```bash
|
||||||
ChessGame/
|
SporeBG-Conid/
|
||||||
├── src/
|
├── src/
|
||||||
│ ├── core/ # 核心游戏逻辑
|
│ ├── core/ # 核心应用与窗口管理
|
||||||
│ │ ├── Game.h/cpp # 游戏核心管理
|
│ ├── game/ # 游戏逻辑核心:棋盘、棋子、规则等
|
||||||
│ │ ├── Board.h/cpp # 棋盘逻辑和规则实现
|
│ ├── graphics/ # 图形渲染相关
|
||||||
│ │ ├── Piece.h/cpp # 棋子基类和具体棋子实现
|
│ ├── input/ # 输入处理系统(键盘、鼠标)
|
||||||
│ │ └── Rules.h/cpp # 游戏规则验证
|
│ ├── scenes/ # 场景管理系统(菜单、对局等)
|
||||||
│ ├── ai/ # 人工智能模块
|
│ ├── utils/ # 工具类与配置
|
||||||
│ │ ├── AIBase.h/cpp
|
│ └── main.cpp # 程序入口(SDL3 回调)
|
||||||
│ │ ├── MinimaxAI.h/cpp
|
├── assets/ # 资源文件:图片、字体、音效
|
||||||
│ │ └── Heuristics.h/cpp
|
|
||||||
│ ├── network/ # 网络模块
|
|
||||||
│ │ ├── NetworkManager.h/cpp
|
|
||||||
│ │ ├── Protocol.h/cpp
|
|
||||||
│ │ └── Server.h/cpp
|
|
||||||
│ ├── ui/ # 用户界面
|
|
||||||
│ │ ├── Renderer.h/cpp # 渲染器(SDL3)
|
|
||||||
│ │ ├── UIComponents.h/cpp
|
|
||||||
│ │ └── MenuSystem.h/cpp
|
|
||||||
│ ├── input/ # ← 输入处理模块(键盘、鼠标等)
|
|
||||||
│ │ ├── InputManager.h/cpp
|
|
||||||
│ ├── utils/ # 工具类
|
|
||||||
│ │ ├── Logger.h/cpp
|
|
||||||
│ │ ├── Config.h/cpp
|
|
||||||
│ │ └── Utils.h/cpp
|
|
||||||
│ └── main.cpp # 程序入口(使用 SDL3 回调)
|
|
||||||
├── assets/ # 资源文件
|
|
||||||
│ ├── images/
|
│ ├── images/
|
||||||
│ ├── fonts/
|
│ ├── fonts/
|
||||||
│ └── sounds/
|
│ └── sounds/
|
||||||
├── config/ # 配置文件(如 game.ini)
|
├── config/ # 配置文件(如 game.ini)
|
||||||
└── build/ # 构建输出目录(.gitignore 掉)
|
└── build/ # 编译输出目录(建议 .gitignore 掉)
|
||||||
```
|
```
|
||||||
|
|
||||||
## 一些想说的
|
## 一些想说的
|
||||||
|
|||||||
Reference in New Issue
Block a user