public void SellGold(int currentPlanetGold, PersonalStatus PS, UtilityMethods UM, Ship ship, Fuel fuel) { Console.Clear(); UM.InventoryDisplay(PS, ship, fuel); Console.WriteLine($"How much Space Gold do you want to sell?"); int quantity = Convert.ToInt32(Console.ReadLine()); if (quantity > PS.SpaceGold) { Console.WriteLine($"You don't have that much Space Gold to sell. You have {PS.SpaceGold} shoes in your cargo hold."); Console.ReadLine(); return; } PS.SpaceGold -= quantity; PS.EarnMoney(quantity * currentPlanetGold); Console.WriteLine($"'Thanks for the Space Gold, I guess. I have plenty already though...' \n" + $"You sold {quantity} Space Gold for {quantity * currentPlanetGold} GC."); Console.ReadLine(); return; }
public void SellTV(int currrentPlanetTV, PersonalStatus PS, UtilityMethods UM, Ship ship, Fuel fuel) { Console.Clear(); UM.InventoryDisplay(PS, ship, fuel); Console.WriteLine($"How many Galactic TVs do you want to sell?"); int quantity = Convert.ToInt32(Console.ReadLine()); if (quantity > PS.GalacticTVs) { Console.WriteLine($"You don't have that many Galactic TVs to sell. You have {PS.GalacticTVs} shoes in your cargo hold."); Console.ReadLine(); return; } PS.GalacticTVs -= quantity; PS.EarnMoney(quantity * currrentPlanetTV); Console.WriteLine($"'Thanks for the Galactic TVs I usually just watch the Valkyries fly by to pass the time.' \n" + $"You sold {quantity} Galactic TVs for {quantity * currrentPlanetTV} GC."); Console.ReadLine(); return; }
public void SellShoes(int currentPlanetShoes, PersonalStatus PS, UtilityMethods UM, Ship ship, Fuel fuel) { Console.Clear(); UM.InventoryDisplay(PS, ship, fuel); Console.WriteLine($"\n\n" + $"\t\tHow many shoes do you want to sell?"); int quantity = Convert.ToInt32(Console.ReadLine()); if (quantity > PS.NoBalanaceShoes) { Console.WriteLine($"" + $"\t\tYou don't have that many shoes to sell. You have {PS.NoBalanaceShoes} shoes in your cargo hold."); Console.ReadLine(); return; } PS.NoBalanaceShoes -= quantity; PS.EarnMoney(quantity * currentPlanetShoes); Console.WriteLine($"'Thank you for these No Balance Shoes these things are AMAZING. Look at me zipping around like\n" + $"a bird in the air, I am the God of Flying without wings!' \n" + $"You sold {quantity} No Balance Shoes for {quantity * currentPlanetShoes} GC."); Console.ReadLine(); return; }
// travel between the stars can be dangerous public void Travel(PersonalStatus ps) { int travelEvent = rnd.Next(1, 11); Console.Clear(); Console.WriteLine("3...\n2...\n1...\nBlast Off!!"); Console.ReadLine(); Console.Clear(); Console.WriteLine("" + " * . * \n" + " #===> * . \n" + " * * *"); Console.ReadLine(); Console.Clear(); Console.WriteLine("" + " * . . * . \n" + " * ###===> . * \n" + " . . * * \n"); Console.ReadLine(); //random event if (travelEvent > 5) { Console.WriteLine("You found some space gold out there!"); if ((ps.SpaceGold + ps.NoBalanaceShoes + ps.GalacticTVs + 1) > ship.ShipCapacity) { Console.WriteLine("You dont have enough room for it though. Sad day..."); Console.ReadLine(); } if ((ps.SpaceGold + ps.NoBalanaceShoes + ps.GalacticTVs + 1) <= ship.ShipCapacity) { ps.SpaceGold += 1; Console.WriteLine($"You now have {ps.SpaceGold} space gold"); Console.ReadLine(); } } if (travelEvent == 5) { Console.WriteLine($"It's lonely out there in space {ps.NameCall()}. You are doing great! Keep it up!"); Console.ReadLine(); } if (travelEvent < 5 && travelEvent > 1) { if (ps.Cash() < 10) { Console.WriteLine("The Pirates killed you because you couldnt pay their 10 GC toll."); Console.ReadLine(); GO.Died(ps, ship); } else { Console.WriteLine("Pirate attack! You lost 10 GC to them"); } ps.SpendMoney(10); Console.WriteLine($"You now have {ps.Cash()} GCs"); Console.ReadLine(); } if (travelEvent == 1) { Console.WriteLine($"The galaxies worst pirates attack you but you easily overpower them. \n" + $"'Please don't kill us {ps.NameCall()}, we will give you 100 GC if you let us go!' \n" + $"You let them off easy this time..."); ps.EarnMoney(100); Console.ReadLine(); } Console.ReadLine(); Console.Clear(); Console.WriteLine("" + " * * . * \n" + " * . ###===> . * \n" + " * . . * "); Console.ReadLine(); Console.Clear(); Console.WriteLine("" + " * . \n" + " * . ###===>\n" + " * * . . "); Console.ReadLine(); }