2024-08-25 23:58:04 +00:00
|
|
|
namespace Debug.MinLong;
|
|
|
|
|
|
|
|
#pragma warning disable CS8981 // 该类型名称仅包含小写 ascii 字符。此类名称可能会成为该语言的保留值。
|
|
|
|
public class Zhangaiwu
|
|
|
|
{
|
2024-08-28 04:19:44 +00:00
|
|
|
private static int SleepTime = 100;
|
|
|
|
public static void newshitou(Main.XiaoLong xiaoLong)
|
2024-08-25 23:58:04 +00:00
|
|
|
{
|
|
|
|
var y = Program.chars.GetLength(0);
|
|
|
|
var x = Program.chars.GetLength(1);
|
|
|
|
var shitou = new Shitou
|
|
|
|
{
|
|
|
|
x = x - 1,
|
|
|
|
y = y - 1
|
|
|
|
};
|
2024-08-28 04:19:44 +00:00
|
|
|
bool isjiafeng = false;//是否加分
|
|
|
|
bool ceshi = false;
|
2024-08-25 23:58:04 +00:00
|
|
|
for (int i = 1; i < x; i++)
|
|
|
|
{
|
2024-08-28 04:19:44 +00:00
|
|
|
//测试
|
|
|
|
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);
|
2024-08-25 23:58:04 +00:00
|
|
|
Program.chars[shitou.y, shitou.x].Char = Program.ShowChar;
|
2024-08-28 04:19:44 +00:00
|
|
|
--shitou.x;
|
2024-08-25 23:58:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class Shitou
|
|
|
|
{
|
|
|
|
public int x;
|
|
|
|
public int y;
|
|
|
|
public char Char = '0';
|
|
|
|
}
|
|
|
|
}
|