diff --git a/RuleEngine/MahjongRoom.cs b/RuleEngine/MahjongRoom.cs index 7638956..0be42c1 100644 --- a/RuleEngine/MahjongRoom.cs +++ b/RuleEngine/MahjongRoom.cs @@ -123,23 +123,12 @@ public class MahjongRoom Deal(); IsFinished = false; - // Safety valve: prevent infinite loops from edge-case game states - const int maxRounds = 500; - int round = 0; - - while (!IsFinished && round < maxRounds) + while (!IsFinished) { if (State.Phase == "deal") { State.Phase = "play"; continue; } if (State.Phase == "settle" || IsFinished) break; StepTurn(); - round++; - } - - if (!IsFinished) - { - State.AddEvent("max_rounds", "", null, $"超过最大回合数({maxRounds}),强制流局"); - Settle(); } }