2026-06-12 19:40:21 +08:00

11 lines
1.3 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.

# game-service 维护说明
1. 修改任何自研游戏逻辑前,先确认目标是 `dice/rock` 自研匹配链路,还是语音房内 `room-rps` 链路;两者不能混改。
2. `dice` 和自研 `rock` 共用 `internal/service/dice``game_dice_matches``rock` 允许平局,`dice` 平局会重投且不结算。
3. 自研游戏机器人胜负策略归 `game-service`,机器人账号池和随机抽取归 `robot-service`;不要把胜率、奖池、水位、风控逻辑下放到 `robot-service`
4. 新自研游戏要优先复用 `internal/domain/selfgame` 的策略、档位奖池、保护状态和日志模型,不要在单个游戏 service 内复制一套胜率判断。
5.`robot_user_win_rate_percent` 不允许再出现在 server/admin/API 逻辑里;线上库若已有遗留列只保留不读写,不做兼容分支。
6. 所有业务逻辑、状态流转、账务幂等、奖池扣增、策略分支都必须写高密度逻辑注释,说明为什么这样做以及失败时如何保持可恢复。
7. 机器人局的策略日志、奖池流水、保护消费事件必须使用幂等键;重试不能重复扣奖池、重复计数或重复消耗补贴额度。
8. 改动后至少运行相关领域、service、storage 测试;涉及 proto/admin/API 时再补充 transport 和 admin 测试。