赞
踩
using System; namespace AeroplaneChess { class Program { //地图 static int[] Maps = new int[100]; //玩家A B坐标 static int[] playerPos = new int[2]; //玩家姓名 static string[] playerNames = new string[2]; //玩家回合标记 static bool[] Flags = new bool[2]; /// <summary> /// 主函数 /// </summary> /// <param name="args"></param> static void Main(string[] args) { //游戏封面 GameShow(); #region 输入玩家姓名 Console.WriteLine("请输入玩家A姓名"); playerNames[0] = Console.ReadLine(); while (playerNames[0]=="") { Console.WriteLine("玩家A姓名不能为空,请重新输入"); playerNames[0] = Console.ReadLine(); } Console.WriteLine("请输入玩家B姓名"); playerNames[1] = Console.ReadLine(); while (playerNames[1] == "" || playerNames[1] == playerNames[0]) { if(playerNames[1] == "") { Console.WriteLine("玩家B姓名不能为空,请重新输入"); playerNames[1] = Console.ReadLine(); } if (playerNames[1] == playerNames[0]) { Console.WriteLine("玩家B姓名不能与玩家A相同,请重新输入"); playerNames[1] = Console.ReadLine(); } } #endregion Console.Clear();//清屏 GameShow(); Console.WriteLine("{0}的飞机用A表示,{1}的士兵用B表示", playerNames[0], playerNames[1]); //初始化地图 InitMap(); //显示棋盘 DrawMap(); //胜利界面 //游戏逻辑 while (playerPos[0] < 99 && playerPos[1] < 99) { if (Flags[0] == false) { playGame(0); } else { Flags[0] = false; } if(playerPos[0]>=99) { Console.WriteLine("玩家{0}无耻的赢了玩家{1}"<
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。