fix: CanAnKong硬编码false + 人类HUD显示听牌/杠/对手状态

修复:
- CanAnKong: 硬编码false → 检查手牌中4张相同(暗杠)
- HumanMahjongPlayer: 添加MeldsSolver依赖,实时检测听牌
- 人类HUD: 显示牌墙/副露/听牌🀄/杠类型(暗/明/加)
- 交互模式人类: 对手显示'X张手牌 | 已pung[..]'不暴露手牌
This commit is contained in:
xiaoou
2026-07-04 17:24:05 +08:00
parent 3c381f2758
commit d416450e56
4 changed files with 81 additions and 25 deletions

View File

@ -134,7 +134,9 @@ public class MahjongPhaseMachine
private bool CanAnKong(MahjongGameState state, string playerId)
{
return false; // Simplified: AI decides during draw phase
// Check if player has 4 identical tiles in hand (暗杠)
var hand = state.Hands[playerId];
return hand.GroupBy(t => t).Any(g => g.Count() >= 4 && !MahjongTile.IsWildcard(g.Key));
}
private bool CanBuKong(MahjongGameState state, string playerId)