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:
@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user