首页 > 学院 > 开发设计 > 正文

[C#]骑士飞行棋

2019-11-08 02:13:32
字体:
来源:转载
供稿:网友

【前言】

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 = "◆";


上一篇:图的存储二

下一篇:go各种初步技能

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表