本帖最后由 复古。先生 于 2014-7-30 23:21 编辑
public static void drawGame()
{
string[] game = new string[100];
int[] stop = { 3, 27, 45, 92 };//暂停1
int[] lucky = { 5, 35, 66, 88, 99 };//幸运轮盘2
int[] guy = { 4, 65, 34, 57, 87,98 };//炸弹3
int[] change = new int[100];//change控制方格效果
#region 令change制0表普通,制1表暂停,制2表轮盘,制3表炸弹
for (int i = 0; i < stop.Length; i++)
{
change[stop【i】] = 1;
}
for (int i = 0; i < lucky.Length; i++)
{
change[lucky【i】] = 2;
}
for (int i = 0; i < guy.Length; i++)
{
change[guy【i】] = 3;
}
#endregion
for (int i = 0; i < 100; i++)
{
switch (change【i】)
{
case 0:
Console.ForegroundColor = ConsoleColor.Yellow;
game 【i】= "□";
break;
case 1:
Console.ForegroundColor = ConsoleColor.Green;
game 【i】= "◆";
break;
case 2:
Console.ForegroundColor = ConsoleColor.DarkRed;
game 【i】= "◎";
break;
case 3:
Console.ForegroundColor = ConsoleColor.Red;
game 【i】= "☆";
break;
default:
game 【i】= "□";
break;
}
}
for (int i = 0; i < 30; i++)
{
Console.Write(game【i】);
}
Console.WriteLine();
for (int i = 30; i < 35; i++)
{
for (int j = 0; j < 29; j++)
{
Console.Write(" ");
}
Console.WriteLine(game【i】);
}
for (int i = 64; i > 34; i--)
{
Console.Write(game【i】);
}
Console.WriteLine();
for (int i = 65; i < 70; i++)
{
Console.WriteLine(game【i】);
}
for (int i = 70; i < 100; i++)
{
Console.Write(game【i】);
}
}
|