feat: demo显示听牌状态+可胡张数

引擎: MahjongRoom.GetTingTiles(player) 返回所有可胡的unique tile
Demo: 每回合后显示'听牌: X: 🀄听N张(tile1 tile2...) | Y: 未听...'
包含已胡/副露中的tile计数,兼容wildcard和258规则

示例: 听牌: AI-东: 🀄听 1张(中) | AI-南: 未听 | AI-西: 未听 | AI-北: 未听
This commit is contained in:
xiaoou
2026-07-05 00:20:53 +08:00
parent ce3bbc7760
commit d83494e669
2 changed files with 35 additions and 1 deletions

View File

@ -174,10 +174,24 @@ else
}
}
// 听牌检测: 每回合后显示各玩家听牌状态
var tingInfo = new List<string>();
foreach (var p in room.State.AlivePlayers)
{
var tingTiles = room.GetTingTiles(p);
if (tingTiles.Count > 0)
{
var tileNames = tingTiles.Select(MahjongTile.ToString);
tingInfo.Add($"{p}: 🀄听 {tingTiles.Count}张({string.Join(" ", tileNames)})");
}
else
tingInfo.Add($"{p}: 未听");
}
Console.WriteLine($" 听牌: {string.Join(" | ", tingInfo)}");
// Show current hands
if (!room.IsFinished)
{
// In human mode, show only opponent hands (human HUD shows their own)
Console.WriteLine();
if (humanMode)
{