public static bool  ControlPlayer()
 {          
     string command = Console.ReadLine();
     Mine.ActiveMine = false;
     Bonus.ActiveBonus = false;
     Trap.ActiveTrap = false;
     Points.ActivePoints = false;
     switch (command)
     {
         case "w":
             Movement.Up();
             break;
         case "s":
             Movement.Down();
             break;
         case "a":
             Movement.Left();
             break;
         case "d":
             Movement.Right();
             break;
         case "exit":
             OutPut.Exit();
             return true;
     }
     return false;
 }
 static public void LostGame()
 {
     if (Player.HP <= 0)
     {
         OutPut.Dead();
         Environment.Exit(0);
     }
 }
 static public void WinGame()
 {
     if (Player.Points >= win)
     {
         OutPut.WinGame();
         Environment.Exit(0);
     }
 }
 public static void StartMenu()
 {
     var command = Console.ReadLine();           
     switch (command)
     {
         case "help":
             OutPut.Help();
             break;
         case "exit":
             OutPut.Exit();
             break;
     }
     Console.Clear();
 }
Exemplo n.º 5
0
 public static void Start()
 {
     while (true)
     {
         OutPut.GamePlay();
         bool endGame = Controller.ControlPlayer();
         if (endGame)
         {
             Environment.Exit(0);
         }
         Console.Clear();
         StatusGame.LostGame();
         StatusGame.WinGame();
     }
 }