Files
AIC-Project/Client/Assets/MiniGames/RockPaperScissors/README.md
T
2026-07-10 10:24:29 +08:00

32 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# RockPaperScissors(石头剪刀布)
本目录是石头剪刀布小游戏的**客户端源文件根目录**,遵循统一的小游戏目录规范(见
`docs/superpowers/specs/2026-06-18-csharp-hotfix-minigame-architecture-design.md` §2.4):
```
MiniGames/RockPaperScissors/
scripts/ # 客户端脚本(C# 热更源码:薄层 IGameClient + 链接的共享 Core
res/ # 美术 / UI / 音效(打成 AssetBundle
```
打热更包时,`scripts/` 编出的热更 DLL(以 `.bytes` 形式)与 `res/` 的美术资源**一起打成 AB 包**,
上传到服务器对应的下载目录(见设计文档 §3.1)。
## 当前状态(C# 客户端已落地)
- `res/UI/Texture/`:三张出招贴图(rock / paper / scissors),将随 AB 打包。
- `scripts/Client/`:客户端薄层 C# 实现 `RpsGameClient``IGameClient`),由 Unity/HybridCLR 编译为热更 DLL
另有 `Client/HotUpdateGames/RPS.Client/RPS.Client.csproj` 链接同一份源做 csc 编译验证。
- 共享核心 `RPS.Core`(规则/状态/编解码)与服务端薄层 `RPS.Server``IGameServerRoom`)的 C# 源码在
`Server/games-src/RPS/`(旧 Lua 版已删除)。
- 待办(独立改造,须 Unity):将 `RPS.Core` 收敛为 `scripts/Core` 单源、服务端 `<Compile Include>` 链接(设计 §10.1)。
## AI 兜底(匹配超时)
- 本游戏为 2 人对战。匹配超过 **15 秒**仍未凑齐真人时,服务器用本游戏自带的 AI 补位,真人与 AI 继续对局。
- AI 逻辑在服务端薄层 `RPS.Server`(C#)中实现,框架不实现具体玩法 AI。
- AI 出招为等概率随机,且不读取真人本回合的选择,保证公平。
- 结算时 AI 玩家以 `isAI = true` 标记,客户端显示对手为 “AI”。
通用规则详见 `Doc/独立游戏系统设计文档.md` 第 13 节。