fix: human模式手牌/反应显示精牌🀫标记
3处ToString调用补WildcardRegistry参数: - HumanMahjongPlayer: 手牌列表+摸牌显示 - MahjongRoom: 反应提示时的手牌显示 修复前: 精牌显示为普通牌名(1筒) 修复后: 精牌显示为 🀫1筒(带🀫前缀)
This commit is contained in:
@ -72,12 +72,12 @@ public class HumanMahjongPlayer
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (drawnTile.HasValue && drawnIdx >= 0)
|
if (drawnTile.HasValue && drawnIdx >= 0)
|
||||||
Console.WriteLine($" 🀫 刚刚摸到: {MahjongTile.ToString(drawnTile.Value)}");
|
Console.WriteLine($" 🀫 刚刚摸到: {MahjongTile.ToString(drawnTile.Value, state.Wildcards)}");
|
||||||
Console.WriteLine($" 手牌 ({hand.Count}张):");
|
Console.WriteLine($" 手牌 ({hand.Count}张):");
|
||||||
for (int i = 0; i < sorted.Count; i++)
|
for (int i = 0; i < sorted.Count; i++)
|
||||||
{
|
{
|
||||||
bool isDrawn = (i == drawnIdx);
|
bool isDrawn = (i == drawnIdx);
|
||||||
Console.WriteLine($" [{i + 1}] {(isDrawn ? "→ " : " ")}{MahjongTile.ToString(sorted[i])}{(isDrawn ? " ← 新摸" : "")}");
|
Console.WriteLine($" [{i + 1}] {(isDrawn ? "→ " : " ")}{MahjongTile.ToString(sorted[i], state.Wildcards)}{(isDrawn ? " ← 新摸" : "")}");
|
||||||
}
|
}
|
||||||
Console.WriteLine();
|
Console.WriteLine();
|
||||||
|
|
||||||
|
|||||||
@ -369,7 +369,7 @@ public class MahjongRoom
|
|||||||
Console.WriteLine();
|
Console.WriteLine();
|
||||||
Console.WriteLine($"=== {p} 可以反应 ===");
|
Console.WriteLine($"=== {p} 可以反应 ===");
|
||||||
Console.WriteLine($" 对手 {discarder} 出了: {MahjongTile.ToString(discardTile)}");
|
Console.WriteLine($" 对手 {discarder} 出了: {MahjongTile.ToString(discardTile)}");
|
||||||
Console.WriteLine($" 你的手牌: {string.Join(" ", State.Hands[p].OrderBy(t => t).Select(MahjongTile.ToString))}");
|
Console.WriteLine($" 你的手牌: {string.Join(" ", State.Hands[p].OrderBy(t => t).Select(t => MahjongTile.ToString(t, State.Wildcards)))}");
|
||||||
Console.Write(" 操作: ");
|
Console.Write(" 操作: ");
|
||||||
var ops = new List<string>();
|
var ops = new List<string>();
|
||||||
if (canWin) ops.Add("h(胡)");
|
if (canWin) ops.Add("h(胡)");
|
||||||
|
|||||||
Reference in New Issue
Block a user