Compare commits

...

2 Commits

View File

@ -40,6 +40,7 @@ public class Main
int frameCount = 0;
double totalTime = 0;
int i; int j;
int p = 0;
var a = Program.chars.GetLength(0);
var b = Program.chars.GetLength(1);
var buffer = new StringBuilder();
@ -49,6 +50,10 @@ public class Main
Console.SetCursorPosition(0, 0);// 设定光标位置
Console.Clear();
buffer.Clear();
xiaoLong.Char = xiaoLong.Char == '웃' ? '유' : '웃';
Program.chars[xiaoLong.y, xiaoLong.x].Char = xiaoLong.Char;
for (i = 0; i < a; i++)
{
for (j = 0; j < b; j++)
@ -69,7 +74,16 @@ public class Main
for (i = 0; i < b; i++)
{
buffer.Append('-');
p = p == i % 2 ? 1 : 0;
if (p == 0)
{
buffer.Append(' ');
}
else
{
buffer.Append('-');
}
}
Console.Write(buffer);
Console.ResetColor();
@ -95,7 +109,7 @@ public class Main
public class XiaoLong
{
public char Char = 'k';//小龙的形状
public char Char = '';//小龙的形状
public ConsoleColor Color = ConsoleColor.Red;//小龙的颜色
public int x;//小龙X坐标
public int y;//小龙Y坐标
@ -143,6 +157,7 @@ public class Main
{
//空格
case ConsoleKey.Spacebar:
case ConsoleKey.PageUp:
if (!xiaoLong.istiao) { new Thread(() => tiaoyue(xiaoLong)).Start(); break; }
xiaoLong.islong = true;
break;