docs(game): 添加游戏模块数据

- 新增 useGameBoardVm 数据层实施说明文档
- 添加 36字花核心玩法与前端规则摘要
- 创建游戏模块数据与界面分层第一阶段实施稿
- 定义四层架构:api/dto、store、view-model hooks、ui层
- 规范 PC 与 Mobile 共享业务逻辑的改造方案
- 明确各层职责边界和组件改造顺序
This commit is contained in:
JiaJun
2026-05-09 17:52:30 +08:00
parent 7622d4121f
commit 6aaf90a6ac
28 changed files with 2635 additions and 258 deletions

View File

@@ -1,7 +1,7 @@
import { CHIP_OPTIONS } from '@/constants'
import {
DEFAULT_ACTIVE_CHIP_ID,
DEFAULT_ANNOUNCEMENT_TTL_MS,
DEFAULT_GAME_CHIP_AMOUNTS,
DEFAULT_GAME_CHIP_COLORS,
GAME_GRID_COLUMNS,
GAME_TOTAL_CELLS,
@@ -41,12 +41,12 @@ export function createGameCells() {
}
export function createDefaultChips() {
return DEFAULT_GAME_CHIP_AMOUNTS.map((amount, index) => ({
amount,
return CHIP_OPTIONS.map((chip, index) => ({
amount: chip.value,
color: DEFAULT_GAME_CHIP_COLORS[index],
id: `chip-${amount}`,
isDefault: `chip-${amount}` === DEFAULT_ACTIVE_CHIP_ID,
label: amount >= 100 ? `${amount / 100}x` : String(amount),
id: chip.id,
isDefault: chip.id === DEFAULT_ACTIVE_CHIP_ID,
label: chip.value >= 100 ? `${chip.value / 100}x` : String(chip.value),
})) satisfies Chip[]
}