Compare commits
2 Commits
8767dbd862
...
284fa1e700
Author | SHA1 | Date | |
---|---|---|---|
284fa1e700 | |||
24d6917c69 |
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user