当前位置: 首页 > news >正文

网站被墙了怎么办开户推广竞价开户

网站被墙了怎么办,开户推广竞价开户,外包公司做的网站,微官网站怎么做我们要在主函数的顶部写一些全局静态字段 确保能在后续的静态方法中能够获取到这些值和修改 static int[] Maps new int[100];static string[] PlayerName new string[2];static int[] PlayerScore new int[2];static bool[] Flags new bool[2] {true,true }; static int[]…

我们要在主函数的顶部写一些全局静态字段 确保能在后续的静态方法中能够获取到这些值和修改

static int[] Maps = new int[100];static string[] PlayerName = new string[2];static int[] PlayerScore = new int[2];static bool[] Flags= new bool[2] {true,true };

 static int[] Maps = new int[100]; 这段代码是设置一个整数类数组方便我们存储后续飞行棋的每个格子和格子所具有的特殊功能 以便于后续的取用 100 代表格子个位

static string[] PlayerName = new string[2];这是存储两个玩家的名字的字符串数组 方便后续调用两个玩家

 static int[] PlayerScore = new int[2];这是用于存储两位玩家所处的格子位数方便后续获取位置并更改

static bool[] Flags= new bool[2] {true,true };存储两位玩家的回合是否进行 后续暂停回合需要用到

主函数

  static void Main(string[] args){GameShow();Console.WriteLine("请输入玩家1的名字:");PlayerName[0] = Console.ReadLine();while (PlayerName[0] == ""){Console.WriteLine("玩家A的姓名不能为空,请重新输入");PlayerName[0] = Console.ReadLine();}Console.WriteLine("请输入玩家2的名字:");PlayerName[1] = Console.ReadLine();while (PlayerName[1] == ""){Console.WriteLine("玩家B的姓名不能为空,请重新输入");PlayerName[0] = Console.ReadLine();}if ( PlayerName[0] == PlayerName[1] ){Console.WriteLine("玩家名字不能相同!请重新输入玩家B的名字");PlayerName[1] = Console.ReadLine();}Console.WriteLine("按回车键开始");Console.ReadLine();Console.Clear();GameShow();Console.WriteLine("玩家A的名字为:{0},玩家B的名字为:{1}", PlayerName[0], PlayerName[1]);InitializeTheMap();FinallyMap();while (PlayerScore [0] < 99 && PlayerScore [1] < 99){for (int i = 0;  i < 2;  i++){if (Flags[i]){Play (i);}else{Flags[i] = true;}if (PlayerScore[i] == 99){Console.ForegroundColor = ConsoleColor.Blue;Console.WriteLine("玩家{0}赢了玩家{1}", PlayerName[i], PlayerName[1 - i]);break;}}}Console.WriteLine("按回车键结束游戏");Console.ReadLine();}

GameShow();打印欢迎语

//

 Console.WriteLine("请输入玩家1的名字:");
 PlayerName[0] = Console.ReadLine();
          
 while (PlayerName[0] == "")
 {
     Console.WriteLine("玩家A的姓名不能为空,请重新输入");
     PlayerName[0] = Console.ReadLine();
 }
 Console.WriteLine("请输入玩家2的名字:");
 PlayerName[1] = Console.ReadLine();
 while (PlayerName[1] == "")
 {
     Console.WriteLine("玩家B的姓名不能为空,请重新输入");
     PlayerName[0] = Console.ReadLine();
 }
 if ( PlayerName[0] == PlayerName[1] )
 {
     Console.WriteLine("玩家名字不能相同!请重新输入玩家B的名字");
     PlayerName[1] = Console.ReadLine();
 }

 Console.WriteLine("按回车键开始");
 Console.ReadLine();
 Console.Clear();

// 这段代码是用来输入玩家姓名

InitializeTheMap();设置上面的Maps整数数组的格子类型

FinallyMap();方法 打印格子

//

  while (PlayerScore [0] < 99 && PlayerScore [1] < 99)
  {
      for (int i = 0;  i < 2;  i++) 两位玩家
      {
          if (Flags[i])// 上面的Flags已经默认了此回合执行true
          {
              Play (i);
          }
          else 上一回合不执行后,下次回合正常执行需要改为true
          {
              Flags[i] = true;
          }
          if (PlayerScore[i] == 99)
          {
              Console.ForegroundColor = ConsoleColor.Blue;
              Console.WriteLine("玩家{0}赢了玩家{1}", PlayerName[i], PlayerName[1 - i]);
              break;
          }
      }
  }

// 这段代码用来判断回合是否暂停

欢迎语方法代码

 static void GameShow()
 {
     //Console.ForegroundColor控制台字体颜色
     //Console.BackgroundColor控制台背景颜色
     Console.ForegroundColor = ConsoleColor.Yellow;
     Console.WriteLine("************************************");
     Console.ForegroundColor = ConsoleColor.Red;
     Console.WriteLine("************************************");
     Console.ForegroundColor = ConsoleColor.Green;
     Console.WriteLine("************************************");
     Console.ForegroundColor = ConsoleColor.White;
     Console.WriteLine("*************飞行棋游戏1.4*************");
     Console.ForegroundColor = ConsoleColor.Cyan;
     Console.WriteLine("************************************");
     Console.ForegroundColor = ConsoleColor.DarkMagenta;
     Console.WriteLine("************************************");
     Console.ForegroundColor = ConsoleColor.DarkBlue;
     Console.WriteLine("************************************");
     Console.ForegroundColor = ConsoleColor.White;
 }

static Random random = new Random(); 这是用来重置每次的地图每次地图需要不同

初始化地图

 static void InitializeTheMap(){int[] LuckDong = new int[5]; // 幸运◎int[] landMine = new int[5];// 地雷★int l = 0;int[] bomb = new int[5]; // 暂停▲int b = 0;int[] TimeTunnel = new int[5]; // 时光隧穿卍int t = 0;for (int i = 0; i < 20; i++){int num = random.Next(1, 101);Thread.Sleep(15);if (i < 5){LuckDong[i] = num;}else if (i < 10){landMine[l++] = num;}else if (i < 15){bomb[b++] = num;}else if (i < 20){TimeTunnel[t++] = num;}}for (int i = 0; i < LuckDong .Length; i++)Maps[LuckDong [i]] = 1;for (int i = 0; i < landMine.Length; i++)Maps[landMine[i]] = 2;for (int i = 0; i < bomb.Length; i++)Maps[bomb[i]] = 3;for (int i = 0; i < TimeTunnel.Length; i++)Maps[TimeTunnel[i]] = 4;}

//

int[] LuckDong = new int[5]; // 幸运◎
int[] landMine = new int[5];// 地雷★
int l = 0;
int[] bomb = new int[5]; // 暂停▲
int b = 0;
int[] TimeTunnel = new int[5]; // 时光隧穿卍
int t = 0;
for (int i = 0; i < 20; i++)
{
    int num = random.Next(1, 101);

    Thread.Sleep(15);


    if (i < 5)
    {
        LuckDong[i] = num;
    }
    else if (i < 10)
    {
        landMine[l++] = num;
    }
    else if (i < 15)
    {
        bomb[b++] = num;
    }
    else if (i < 20)
    {
        TimeTunnel[t++] = num;
    }
}

// 四种特殊类型的格子用随机数生成所在格子的位置

//

 for (int i = 0; i < LuckDong .Length; i++)
     Maps[LuckDong [i]] = 1;
 for (int i = 0; i < landMine.Length; i++)
     Maps[landMine[i]] = 2;
 for (int i = 0; i < bomb.Length; i++)
     Maps[bomb[i]] = 3;
 for (int i = 0; i < TimeTunnel.Length; i++)
     Maps[TimeTunnel[i]] = 4;

// 同种格子设置同种的值 位置随机且不同 分别for循环放入Maps数组中 方便后续打印

设置单个格子所代表的图案

 static string DrawStringMap(int i){string str = "";if (PlayerScore[0] == PlayerScore[1] && PlayerScore[0] == i){str = "<>";}else if (PlayerScore[0] == i){str = "A";}else if (PlayerScore[1] == i){str = "B";}else{switch (Maps[i]){case 0:Console.ForegroundColor = ConsoleColor.Yellow;str = "□";break;case 1:Console.ForegroundColor = ConsoleColor.Green;str = "◎";break;case 2:Console.ForegroundColor = ConsoleColor.Red;str = "☆";break;case 3:Console.ForegroundColor = ConsoleColor.Blue;str = "▲";break;case 4:Console.ForegroundColor = ConsoleColor.DarkCyan;str = "卐";break;}}return str;}

 static string DrawStringMap(int i)
 {
      string str = "";
     if (PlayerScore[0] == PlayerScore[1] && PlayerScore[0] == i)
     {
         str = "<>"; 起始时两个格子在同一起点用<>表示
     }
     else if (PlayerScore[0] == i)
     {
         
         str = "A";后续用A表示玩家一
     }
     else if (PlayerScore[1] == i)
     {
         str = "B";玩家二
     }
     else
     {
         switch (Maps[i])
         {
             case 0:
                 Console.ForegroundColor = ConsoleColor.Yellow;
                 str = "□";没有作用的空白格子
                 break;
             case 1:
                 Console.ForegroundColor = ConsoleColor.Green;
                 str = "◎";幸运格子 
                 break;
             case 2:
                 Console.ForegroundColor = ConsoleColor.Red;
                 str = "☆";炸弹
                 break;
             case 3:
                 Console.ForegroundColor = ConsoleColor.Blue;
                 str = "▲";暂停
                 break;
             case 4:
                 Console.ForegroundColor = ConsoleColor.DarkCyan;
                 str = "卐";时空隧道
                 break;
         }
     }
     return str;


 }

打印全部地图

 static void FinallyMap()
 {
     Console.ForegroundColor = ConsoleColor.Green;
     Console.WriteLine("图例:幸运轮盘:◎\t地雷:☆\t暂停:▲\t时空隧道:卐");
     Console.WriteLine("玩家A的名字为:{0},玩家B的名字为:{1}", PlayerName[0], PlayerName[1]);
     Console.WriteLine(PlayerName[0] + " " + PlayerScore[0] + " " + PlayerName[1] + " " + PlayerScore[1]);
     Console.ForegroundColor = ConsoleColor.White;

    //  第一横行
     for (int i = 0; i < 30; i++)
     {
         Console.Write(DrawStringMap(i));
         Console.ForegroundColor = ConsoleColor.White;
     }
     Console.WriteLine();
     

     // 第一竖行
     for (int i = 30; i < 35; i++)
     {
         for (int j = 0; j <= 28; j++)
         {
             Console.Write("  "); 
         }
         Console.Write(DrawStringMap(i));
         Console.ForegroundColor = ConsoleColor.White;
         Console.WriteLine();
     }
     

     // 第二横行
     for (int i = 64; i >= 35; i--)
     {
         Console.Write(DrawStringMap(i));
         Console.ForegroundColor = ConsoleColor.White;
     }
     Console.WriteLine();
  

     // 第二竖行
     for (int i = 65; i <= 69; i++)
     {
         Console.WriteLine(DrawStringMap(i));
         Console.ForegroundColor = ConsoleColor.White;
     }
     

     // 第三横行
     for (int i = 70; i <= 99; i++)
     {
         Console.Write(DrawStringMap(i));
         Console.ForegroundColor = ConsoleColor.White;
     }
     Console.WriteLine();
 }

 static void FinallyMap(){Console.ForegroundColor = ConsoleColor.Green;Console.WriteLine("图例:幸运轮盘:◎\t地雷:☆\t暂停:▲\t时空隧道:卐");Console.WriteLine("玩家A的名字为:{0},玩家B的名字为:{1}", PlayerName[0], PlayerName[1]);Console.WriteLine(PlayerName[0] + " " + PlayerScore[0] + " " + PlayerName[1] + " " + PlayerScore[1]);Console.ForegroundColor = ConsoleColor.White;//  第一横行for (int i = 0; i < 30; i++){Console.Write(DrawStringMap(i));Console.ForegroundColor = ConsoleColor.White;}Console.WriteLine();// 第一竖行for (int i = 30; i < 35; i++){for (int j = 0; j <= 28; j++){Console.Write("  "); }Console.Write(DrawStringMap(i));Console.ForegroundColor = ConsoleColor.White;Console.WriteLine();}// 第二横行for (int i = 64; i >= 35; i--){Console.Write(DrawStringMap(i));Console.ForegroundColor = ConsoleColor.White;}Console.WriteLine();// 第二竖行for (int i = 65; i <= 69; i++){Console.WriteLine(DrawStringMap(i));Console.ForegroundColor = ConsoleColor.White;}// 第三横行for (int i = 70; i <= 99; i++){Console.Write(DrawStringMap(i));Console.ForegroundColor = ConsoleColor.White;}Console.WriteLine();}

掷骰子的方法

static void Play(int num )
{
   Random  random = new Random();
    int dice = random.Next(1, 7);
    Console.WriteLine("按回车键开始掷骰子");
    Console.ReadLine();
    Console.WriteLine("{0}掷出了{1}点", PlayerName[num], dice);
    PlayerScore[num] += dice;
    ChangePlayerScore();
    Console.WriteLine("按回车键继续");
    Console.ReadLine();

上述代码用于获取随机掷骰子的点数


    if (PlayerScore[num] == PlayerScore[1-num ])
    {
        Console.WriteLine("玩家{0}踩到了玩家{1},玩家{2}后退6格", PlayerName[num], PlayerName[1 - num], PlayerName[1 - num]);
        PlayerScore[1 - num] -= 6;
        ChangePlayerScore();该方法是用来防止玩家位置出现在地图外
        Console.WriteLine("按回车键继续");
        Console.ReadLine();

    }

两种情况 
    else
    {
        switch (Maps[PlayerScore[num]])
        {
            case 0:
                {
                    Console.WriteLine("玩家{0}踩到了什么,无事发生", PlayerName[num]);
                    break;
                }
            case 1:
                {
                    Console.WriteLine("玩家{0}踩到了幸运轮盘,请选择 1--交换位置 2--轰炸对方", PlayerName[num]);
                    string input = Console.ReadLine();
                    while (true)
                    {
                        if (input == "1")
                        {
                            Console.WriteLine("玩家{0}选择跟玩家{1}交换位置", PlayerName[num], PlayerName[1 - num]); ;
                            Console.ReadKey();
                            int temp = PlayerScore[num];
                            PlayerScore[num] = PlayerScore[1 - num];
                            PlayerScore[1 - num] = temp;
                            Console.WriteLine("交换完成!!!按任意键继续游戏!!!");
                            Console.ReadKey();
                            break;
                        }
                        else if (input == "2")
                        {
                            Console.WriteLine("玩家{0}选择轰炸玩家{1},玩家{2}后退6格", PlayerName[num], PlayerName[1 - num], PlayerName[1 - num]);
                            PlayerScore [1 - num] -= 6;
                            ChangePlayerScore();
                            Console.ReadKey();
                            break;
                        }
                        else
                        {
                            Console.WriteLine("只能输入1或者2 1--交换位置 2--轰炸对方");
                            input = Console.ReadLine();
                        }
                    }
                    break;
                }
            case 2:
                Console.WriteLine("玩家{0}踩到了地雷,后退6格", PlayerName[num]);
                Console.ReadKey();
                PlayerScore [num] -= 6;
                ChangePlayerScore();
                break;
            case 3:
                Console.WriteLine("玩家{0}踩到了暂停,暂停一回合", PlayerName[num]);
                Flags[num] = false;
                Console.ReadKey();
                break;
            case 4:
                Console.WriteLine("玩家{0}踩到了时空隧道,前进10格", PlayerName[num]);
                PlayerScore [num] += 10;
                ChangePlayerScore();
                Console.ReadKey();
                break;
        }
    }
    Console .Clear();
   
    FinallyMap();
   

}

static void Play(int num )
{Random  random = new Random();int dice = random.Next(1, 7);Console.WriteLine("按回车键开始掷骰子");Console.ReadLine();Console.WriteLine("{0}掷出了{1}点", PlayerName[num], dice);PlayerScore[num] += dice;ChangePlayerScore();Console.WriteLine("按回车键继续");Console.ReadLine();if (PlayerScore[num] == PlayerScore[1-num ]){Console.WriteLine("玩家{0}踩到了玩家{1},玩家{2}后退6格", PlayerName[num], PlayerName[1 - num], PlayerName[1 - num]);PlayerScore[1 - num] -= 6;ChangePlayerScore();Console.WriteLine("按回车键继续");Console.ReadLine();}else{switch (Maps[PlayerScore[num]]){case 0:{Console.WriteLine("玩家{0}踩到了什么,无事发生", PlayerName[num]);break;}case 1:{Console.WriteLine("玩家{0}踩到了幸运轮盘,请选择 1--交换位置 2--轰炸对方", PlayerName[num]);string input = Console.ReadLine();while (true){if (input == "1"){Console.WriteLine("玩家{0}选择跟玩家{1}交换位置", PlayerName[num], PlayerName[1 - num]); ;Console.ReadKey();int temp = PlayerScore[num];PlayerScore[num] = PlayerScore[1 - num];PlayerScore[1 - num] = temp;Console.WriteLine("交换完成!!!按任意键继续游戏!!!");Console.ReadKey();break;}else if (input == "2"){Console.WriteLine("玩家{0}选择轰炸玩家{1},玩家{2}后退6格", PlayerName[num], PlayerName[1 - num], PlayerName[1 - num]);PlayerScore [1 - num] -= 6;ChangePlayerScore();Console.ReadKey();break;}else{Console.WriteLine("只能输入1或者2 1--交换位置 2--轰炸对方");input = Console.ReadLine();}}break;}case 2:Console.WriteLine("玩家{0}踩到了地雷,后退6格", PlayerName[num]);Console.ReadKey();PlayerScore [num] -= 6;ChangePlayerScore();break;case 3:Console.WriteLine("玩家{0}踩到了暂停,暂停一回合", PlayerName[num]);Flags[num] = false;Console.ReadKey();break;case 4:Console.WriteLine("玩家{0}踩到了时空隧道,前进10格", PlayerName[num]);PlayerScore [num] += 10;ChangePlayerScore();Console.ReadKey();break;}}Console .Clear();FinallyMap();}

  FinallyMap(); 在玩的方法中由于玩家位置发生改变所以要重新打印一次地图

static void ChangePlayerScore()
{
    for (int  i = 0;  i < 2;  i++)
    {
        if (PlayerScore [i] < 0 )
        {
            PlayerScore[i]= 0;
        }
        if (PlayerScore[i] > 99 )
        {
            PlayerScore [i] = 99;
        }
    }
}

这方法是用来判断玩家位置是否出界如果出界默认在段端点

完整代码

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;namespace 飞行棋游戏
{internal class Program{static int[] Maps = new int[100];static string[] PlayerName = new string[2];static int[] PlayerScore = new int[2];static bool[] Flags= new bool[2] {true,true };static void Main(string[] args){GameShow();Console.WriteLine("请输入玩家1的名字:");PlayerName[0] = Console.ReadLine();while (PlayerName[0] == ""){Console.WriteLine("玩家A的姓名不能为空,请重新输入");PlayerName[0] = Console.ReadLine();}Console.WriteLine("请输入玩家2的名字:");PlayerName[1] = Console.ReadLine();while (PlayerName[1] == ""){Console.WriteLine("玩家B的姓名不能为空,请重新输入");PlayerName[0] = Console.ReadLine();}if ( PlayerName[0] == PlayerName[1] ){Console.WriteLine("玩家名字不能相同!请重新输入玩家B的名字");PlayerName[1] = Console.ReadLine();}Console.WriteLine("按回车键开始");Console.ReadLine();Console.Clear();GameShow();Console.WriteLine("玩家A的名字为:{0},玩家B的名字为:{1}", PlayerName[0], PlayerName[1]);InitializeTheMap();FinallyMap();while (PlayerScore [0] < 99 && PlayerScore [1] < 99){for (int i = 0;  i < 2;  i++){if (Flags[i]){Play (i);}else{Flags[i] = true;}if (PlayerScore[i] == 99){Console.ForegroundColor = ConsoleColor.Blue;Console.WriteLine("玩家{0}赢了玩家{1}", PlayerName[i], PlayerName[1 - i]);break;}}}Console.WriteLine("按回车键结束游戏");Console.ReadLine();}static void GameShow(){//Console.ForegroundColor控制台字体颜色//Console.BackgroundColor控制台背景颜色Console.ForegroundColor = ConsoleColor.Yellow;Console.WriteLine("************************************");Console.ForegroundColor = ConsoleColor.Red;Console.WriteLine("************************************");Console.ForegroundColor = ConsoleColor.Green;Console.WriteLine("************************************");Console.ForegroundColor = ConsoleColor.White;Console.WriteLine("*************飞行棋游戏1.4*************");Console.ForegroundColor = ConsoleColor.Cyan;Console.WriteLine("************************************");Console.ForegroundColor = ConsoleColor.DarkMagenta;Console.WriteLine("************************************");Console.ForegroundColor = ConsoleColor.DarkBlue;Console.WriteLine("************************************");Console.ForegroundColor = ConsoleColor.White;}static Random random = new Random();static void InitializeTheMap(){int[] LuckDong = new int[5]; // 幸运◎int[] landMine = new int[5];// 地雷★int l = 0;int[] bomb = new int[5]; // 暂停▲int b = 0;int[] TimeTunnel = new int[5]; // 时光隧穿卍int t = 0;for (int i = 0; i < 20; i++){int num = random.Next(1, 101);Thread.Sleep(15);if (i < 5){LuckDong[i] = num;}else if (i < 10){landMine[l++] = num;}else if (i < 15){bomb[b++] = num;}else if (i < 20){TimeTunnel[t++] = num;}}for (int i = 0; i < LuckDong .Length; i++)Maps[LuckDong [i]] = 1;for (int i = 0; i < landMine.Length; i++)Maps[landMine[i]] = 2;for (int i = 0; i < bomb.Length; i++)Maps[bomb[i]] = 3;for (int i = 0; i < TimeTunnel.Length; i++)Maps[TimeTunnel[i]] = 4;}static void FinallyMap(){Console.ForegroundColor = ConsoleColor.Green;Console.WriteLine("图例:幸运轮盘:◎\t地雷:☆\t暂停:▲\t时空隧道:卐");Console.WriteLine("玩家A的名字为:{0},玩家B的名字为:{1}", PlayerName[0], PlayerName[1]);Console.WriteLine(PlayerName[0] + " " + PlayerScore[0] + " " + PlayerName[1] + " " + PlayerScore[1]);Console.ForegroundColor = ConsoleColor.White;//  第一横行for (int i = 0; i < 30; i++){Console.Write(DrawStringMap(i));Console.ForegroundColor = ConsoleColor.White;}Console.WriteLine();// 第一竖行for (int i = 30; i < 35; i++){for (int j = 0; j <= 28; j++){Console.Write("  "); }Console.Write(DrawStringMap(i));Console.ForegroundColor = ConsoleColor.White;Console.WriteLine();}// 第二横行for (int i = 64; i >= 35; i--){Console.Write(DrawStringMap(i));Console.ForegroundColor = ConsoleColor.White;}Console.WriteLine();// 第二竖行for (int i = 65; i <= 69; i++){Console.WriteLine(DrawStringMap(i));Console.ForegroundColor = ConsoleColor.White;}// 第三横行for (int i = 70; i <= 99; i++){Console.Write(DrawStringMap(i));Console.ForegroundColor = ConsoleColor.White;}Console.WriteLine();}static string DrawStringMap(int i){string str = "";if (PlayerScore[0] == PlayerScore[1] && PlayerScore[0] == i){str = "<>";}else if (PlayerScore[0] == i){str = "A";}else if (PlayerScore[1] == i){str = "B";}else{switch (Maps[i]){case 0:Console.ForegroundColor = ConsoleColor.Yellow;str = "□";break;case 1:Console.ForegroundColor = ConsoleColor.Green;str = "◎";break;case 2:Console.ForegroundColor = ConsoleColor.Red;str = "☆";break;case 3:Console.ForegroundColor = ConsoleColor.Blue;str = "▲";break;case 4:Console.ForegroundColor = ConsoleColor.DarkCyan;str = "卐";break;}}return str;}static void Play(int num ){Random  random = new Random();int dice = random.Next(1, 7);Console.WriteLine("按回车键开始掷骰子");Console.ReadLine();Console.WriteLine("{0}掷出了{1}点", PlayerName[num], dice);PlayerScore[num] += dice;ChangePlayerScore();Console.WriteLine("按回车键继续");Console.ReadLine();if (PlayerScore[num] == PlayerScore[1-num ]){Console.WriteLine("玩家{0}踩到了玩家{1},玩家{2}后退6格", PlayerName[num], PlayerName[1 - num], PlayerName[1 - num]);PlayerScore[1 - num] -= 6;ChangePlayerScore();Console.WriteLine("按回车键继续");Console.ReadLine();}else{switch (Maps[PlayerScore[num]]){case 0:{Console.WriteLine("玩家{0}踩到了什么,无事发生", PlayerName[num]);break;}case 1:{Console.WriteLine("玩家{0}踩到了幸运轮盘,请选择 1--交换位置 2--轰炸对方", PlayerName[num]);string input = Console.ReadLine();while (true){if (input == "1"){Console.WriteLine("玩家{0}选择跟玩家{1}交换位置", PlayerName[num], PlayerName[1 - num]); ;Console.ReadKey();int temp = PlayerScore[num];PlayerScore[num] = PlayerScore[1 - num];PlayerScore[1 - num] = temp;Console.WriteLine("交换完成!!!按任意键继续游戏!!!");Console.ReadKey();break;}else if (input == "2"){Console.WriteLine("玩家{0}选择轰炸玩家{1},玩家{2}后退6格", PlayerName[num], PlayerName[1 - num], PlayerName[1 - num]);PlayerScore [1 - num] -= 6;ChangePlayerScore();Console.ReadKey();break;}else{Console.WriteLine("只能输入1或者2 1--交换位置 2--轰炸对方");input = Console.ReadLine();}}break;}case 2:Console.WriteLine("玩家{0}踩到了地雷,后退6格", PlayerName[num]);Console.ReadKey();PlayerScore [num] -= 6;ChangePlayerScore();break;case 3:Console.WriteLine("玩家{0}踩到了暂停,暂停一回合", PlayerName[num]);Flags[num] = false;Console.ReadKey();break;case 4:Console.WriteLine("玩家{0}踩到了时空隧道,前进10格", PlayerName[num]);PlayerScore [num] += 10;ChangePlayerScore();Console.ReadKey();break;}}Console .Clear();FinallyMap();}static void ChangePlayerScore(){for (int  i = 0;  i < 2;  i++){if (PlayerScore [i] < 0 ){PlayerScore[i]= 0;}if (PlayerScore[i] > 99 ){PlayerScore [i] = 99;}}}}
}

http://www.ds6.com.cn/news/19584.html

相关文章:

  • 自己做的网站怎么添加采集模块哈尔滨seo关键词排名
  • 华为建站wordpress网站推广策划书
  • 苏州做网站推广的谷歌外链代发
  • 网站群管理平台方案seo投放营销
  • 淄博哪里做网站江西百度推广公司
  • 中国医院考试网站模板下载指数运算公式大全
  • 怎么做网站步骤优化网站有哪些方法
  • 南宁外贸网站建设万物识别扫一扫
  • 如何做网站优化seo手机优化软件下载
  • 新公司 做网站 流程南昌百度快速排名提升
  • 做网站广告软件网络促销的方法有哪些
  • 网站建设费用价格表军事新闻 今日关注
  • 真人做爰直播试看网站深圳网站营销seo费用
  • 类似于美团的网站怎么做的代运营公司哪家好一些
  • 网站更新要怎么做衡阳百度推广公司
  • 济南网站维护公司各种网站
  • 马云1688网站在濮阳如何做关系网站优化公司
  • 外销网站建立公关公司经营范围
  • 甘南网站设计公司广州网站建设推广专家
  • 网站建设入驻网络推广网络营销外包
  • 网站怎么做404页面百度网站推广价格
  • 怎么自己设计房子效果图网站优化包括哪些内容
  • 郑州做网站公司网络推广企划
  • 宁波网站建设设计网站建站在线制作
  • 淘宝客手机网站开发对网站外部的搜索引擎优化
  • 怎么建一个网站卖东西奉化云优化seo
  • 网站开发国内外研究动态网络开发
  • 中国建设招标网是私人网站吗软文范例大全500字
  • 网站开发电话话术网站推广优化的方法
  • 新手做电商需要多少钱搜索引擎优化seo优惠