fix: 人类模式子菜单显示精牌🀫 + 反应提示加听牌
3处修复:
1. 碰/杠/吃后子菜单手牌: ToString→ToString(wildcards) (精牌🀫)
2. 反应提示加听牌: 显示 🀄听牌 N张(tile list)
3. 杠后手牌同样修复
修复前: [1] 4条 (精牌不显示标记)
修复后: [1] 🀫4条 (精牌带🀫前缀)
This commit is contained in:
@ -370,6 +370,13 @@ public class MahjongRoom
|
|||||||
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(t => MahjongTile.ToString(t, State.Wildcards)))}");
|
Console.WriteLine($" 你的手牌: {string.Join(" ", State.Hands[p].OrderBy(t => t).Select(t => MahjongTile.ToString(t, State.Wildcards)))}");
|
||||||
|
// Show 听牌 info
|
||||||
|
var tingTiles = GetTingTiles(p);
|
||||||
|
if (tingTiles.Count > 0)
|
||||||
|
{
|
||||||
|
var names = tingTiles.Select(t => MahjongTile.ToString(t, State.Wildcards));
|
||||||
|
Console.WriteLine($" 🀄听牌: {tingTiles.Count}张 ({string.Join(" ", names)})");
|
||||||
|
}
|
||||||
Console.Write(" 操作: ");
|
Console.Write(" 操作: ");
|
||||||
var ops = new List<string>();
|
var ops = new List<string>();
|
||||||
if (canWin) ops.Add("h(胡)");
|
if (canWin) ops.Add("h(胡)");
|
||||||
@ -448,7 +455,7 @@ public class MahjongRoom
|
|||||||
Console.WriteLine($" 碰/杠后手牌 ({hand.Count}张):");
|
Console.WriteLine($" 碰/杠后手牌 ({hand.Count}张):");
|
||||||
var sorted = hand.OrderBy(t => t).ToList();
|
var sorted = hand.OrderBy(t => t).ToList();
|
||||||
for (int i = 0; i < sorted.Count; i++)
|
for (int i = 0; i < sorted.Count; i++)
|
||||||
Console.WriteLine($" [{i + 1}] {MahjongTile.ToString(sorted[i])}");
|
Console.WriteLine($" [{i + 1}] {MahjongTile.ToString(sorted[i], State.Wildcards)}");
|
||||||
Console.Write($" 请出牌 (1-{hand.Count}): ");
|
Console.Write($" 请出牌 (1-{hand.Count}): ");
|
||||||
int discardIdx;
|
int discardIdx;
|
||||||
while (!int.TryParse(Console.ReadLine(), out discardIdx) || discardIdx < 1 || discardIdx > sorted.Count)
|
while (!int.TryParse(Console.ReadLine(), out discardIdx) || discardIdx < 1 || discardIdx > sorted.Count)
|
||||||
@ -511,7 +518,7 @@ public class MahjongRoom
|
|||||||
Console.WriteLine($" 吃后手牌 ({remainingHand.Count}张):");
|
Console.WriteLine($" 吃后手牌 ({remainingHand.Count}张):");
|
||||||
var sorted = remainingHand.OrderBy(t => t).ToList();
|
var sorted = remainingHand.OrderBy(t => t).ToList();
|
||||||
for (int i = 0; i < sorted.Count; i++)
|
for (int i = 0; i < sorted.Count; i++)
|
||||||
Console.WriteLine($" [{i + 1}] {MahjongTile.ToString(sorted[i])}");
|
Console.WriteLine($" [{i + 1}] {MahjongTile.ToString(sorted[i], State.Wildcards)}");
|
||||||
Console.Write($" 请出牌 (1-{remainingHand.Count}): ");
|
Console.Write($" 请出牌 (1-{remainingHand.Count}): ");
|
||||||
int discardIdx;
|
int discardIdx;
|
||||||
while (!int.TryParse(Console.ReadLine(), out discardIdx) || discardIdx < 1 || discardIdx > sorted.Count)
|
while (!int.TryParse(Console.ReadLine(), out discardIdx) || discardIdx < 1 || discardIdx > sorted.Count)
|
||||||
@ -665,7 +672,7 @@ public class MahjongRoom
|
|||||||
var sorted = hand.OrderBy(t => t).ToList();
|
var sorted = hand.OrderBy(t => t).ToList();
|
||||||
Console.WriteLine($" 杠后手牌 ({hand.Count}张):");
|
Console.WriteLine($" 杠后手牌 ({hand.Count}张):");
|
||||||
for (int i = 0; i < sorted.Count; i++)
|
for (int i = 0; i < sorted.Count; i++)
|
||||||
Console.WriteLine($" [{i + 1}] {MahjongTile.ToString(sorted[i])}");
|
Console.WriteLine($" [{i + 1}] {MahjongTile.ToString(sorted[i], State.Wildcards)}");
|
||||||
Console.Write($" 请出牌 (1-{hand.Count}): ");
|
Console.Write($" 请出牌 (1-{hand.Count}): ");
|
||||||
int idx;
|
int idx;
|
||||||
while (!int.TryParse(Console.ReadLine(), out idx) || idx < 1 || idx > sorted.Count)
|
while (!int.TryParse(Console.ReadLine(), out idx) || idx < 1 || idx > sorted.Count)
|
||||||
|
|||||||
Reference in New Issue
Block a user