Beispiel #1
0
 public void Bigagua()
 {
     Console.WriteLine("Welcome to BIG AGUA!!!");
     Console.WriteLine("---------------------\nPress Enter to continue");
     Console.ReadLine();
     Console.WriteLine($"Your health is at {character.Storage.Health -= 15}%");
     Console.WriteLine($"Your fuel is at {character.Storage.Fuel -= 25}%");
     Console.WriteLine($"You have {character.Storage.Coin} coins\nPress Enter to Continue.");
     Console.ReadLine();
     Console.Clear();
     p.marketBigagua();
 }
Beispiel #2
0
 //Planet BigAgua
 public void calHealth(Character character)
 {
     try
     {
         double health = 50;
         Console.WriteLine("How many do you want to buy?");
         double n = double.Parse(Console.ReadLine());
         if (character.Storage.Coin < health)
         {
             Console.WriteLine("Insuficient Funds you cannot buy this item. Please choose a different item.\n Press Enter to continue");
             Console.ReadLine();
             Console.Clear();
             p.marketBigagua();
         }
         else
         {
             character.Storage.Coin -= n * health;
         }
         character.Storage.Health += 50 * n;
         Console.WriteLine($"You now have {character.Storage.Coin} coins.");
         Console.WriteLine($"Your Health is now at {character.Storage.Health}%");
         Console.ReadLine();
     }
     catch (Exception)
     {
         Console.WriteLine("Wrong input use numbers");
         calHealth(character);
     }
 }