namespace Debug.MinLong; #pragma warning disable CS8981 // 该类型名称仅包含小写 ascii 字符。此类名称可能会成为该语言的保留值。 public class Zhangaiwu { private static int SleepTime = 100; public static void newshitou(Main.XiaoLong xiaoLong) { var y = Program.chars.GetLength(0); var x = Program.chars.GetLength(1); var shitou = new Shitou { x = x - 1, y = y - 1 }; bool isjiafeng = false;//是否加分 bool ceshi = false; for (int i = 1; i < x; i++) { //测试 if (!ceshi && shitou.x == xiaoLong.x + 1) { ceshi = true; new Thread(() => Main.tiaoyue(xiaoLong)).Start(); // Main.tiaoyue(xiaoLong); } if (shitou.x != xiaoLong.x || shitou.y != xiaoLong.y) { Program.chars[shitou.y, shitou.x].Char = '0'; if (shitou.x < xiaoLong.x && !isjiafeng) { isjiafeng = true; xiaoLong.score++; SleepTime--; } } else { Program.IsWhile = false; } Thread.Sleep(SleepTime); Program.chars[shitou.y, shitou.x].Char = Program.ShowChar; --shitou.x; } } public class Shitou { public int x; public int y; public char Char = '0'; } }