【前言】
C#视频最近看的比较慢,今天终于到了骑士飞行棋了
【正文】
if (playerPos[0] == playerPos[1] && playerPos[0] == pos) //如果玩家A和B在起点的时候画
{
Console.ForegroundColor = ConsoleColor.Cyan;
temp = "<>";
}
else if (playerPos[0] == pos)//玩家A在地图上显示A
{
Console.ForegroundColor = ConsoleColor.Red;
temp = "A";
}
else if (playerPos[1] == pos)//玩家B在地图上显示B
{
Console.ForegroundColor = ConsoleColor.Blue;
temp = "B";
}
else
{
switch (Map[pos])
{
case 0: Console.ForegroundColor = ConsoleColor.White;
temp = "○";
break;
case 1: Console.ForegroundColor = ConsoleColor.Red;
temp = "★";
break;
case 2: Console.ForegroundColor = ConsoleColor.Magenta;
temp = "■";
break;
case 3: Console.ForegroundColor = ConsoleColor.Yellow;
temp = "▲";
break;
case 4: Console.ForegroundColor = ConsoleColor.Green;
temp = "◆";