【前言】
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 = "◆";
新聞熱點
疑難解答