Example #1
0
 public void Stonks()
 {
     Console.WriteLine("Welcome to STONKS!!!");
     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.sellingStonks();
 }
Example #2
0
 public void calSubGold(Character character)
 {
     try
     {
         double gold = 1000;
         Console.WriteLine("How many do you want to Sell?");
         double n = double.Parse(Console.ReadLine());
         if (character.Storage.Gold == 0)
         {
             Console.WriteLine("You do not have any gold to sell. Please choose something else to sell.\n Press Enter to continue");
             Console.ReadLine();
             Console.Clear();
             p.sellingStonks();
         }
         else
         {
             character.Storage.Coin += n * gold;
         }
         character.Storage.Gold -= n;
         Console.WriteLine($"You now have {character.Storage.Coin} coins.");
         Console.WriteLine($"You now have {character.Storage.Gold} Gold");
         Console.ReadLine();
     }
     catch (Exception)
     {
         Console.WriteLine("Wrong input use numbers");
         calSubGold(character);
     }
 }