public Store() { lemons = new Lemons(); paper_Cup = new Paper_Cup(); sugar = new Sugar(); ice_Cubes = new Ice_Cubes(); }
public double amountOfPurchasedLemons(int lemonsNeededToBuy) { Lemons lemon = new Lemons(); getLemons = lemon.pullCost() * lemonsNeededToBuy; return(getLemons); }
public List <Lemons> SellLemons(int itemsBeingSold, Bank bank) { List <Lemons> newLemons = new List <Lemons>(); Lemons lemons = new Lemons(); if (itemsBeingSold != 30) { for (int i = 0; i < itemsBeingSold; i++) { if (bank.SubtractMoney(lemons.GetCost())) { newLemons.Add(new Lemons()); } } } else if (bank.SubtractMoney(lemons.GetBulkCost())) { for (int i = 0; i < itemsBeingSold; i++) { newLemons.Add(new Lemons()); } } return(newLemons); }
public void AddInitialInventory() { lemons = new Lemons(); sugar = new Sugar(); iceCubes = new IceCubes(); cups = new Cups(); }
public Expenses() { ice = new Ice(); lemons = new Lemons(); sugar = new Sugar(); cup = new Cup(); }
public void PurchaseFromStore(Store store, Player player, Lemons lemons, IceCubes iceCubes, Sugar sugar, Cups cups) { string input = ""; string amountToPurchase = ""; int amountToPurchaseInt = 0; while (input.ToLower() != "exit") { input = userInterface.GetStringInput("Type 'lemons' to buy lemons, 'ice' to buy ice cubes, 'sugar' to purchase cups of sugar, or 'cups' to purchase cups. Type 'exit' to finish purchasing"); switch (input.ToLower()) { case "lemons": PurchaseLemons(store, player, lemons, amountToPurchase, amountToPurchaseInt); break; case "ice": PurchaseIce(store, player, iceCubes, amountToPurchase, amountToPurchaseInt); break; case "sugar": PurchaseSugar(store, player, sugar, amountToPurchase, amountToPurchaseInt); break; case "cups": PurchaseCups(store, player, cups, amountToPurchase, amountToPurchaseInt); break; default: break; } } }
//Constructor public Store(IceCubes iceCubes, Lemons lemons, Cups cups, Sugar sugar, Player playerOne) { this.iceCubes = iceCubes; this.cups = cups; this.sugar = sugar; this.lemons = lemons; this.playerOne = playerOne; }
//member methods public void AddingLemons(Player player) { for (int i = 0; i < player.numberOfItemsBought; i++) { Lemons Lemons = new Lemons(); storingLemons.Add(1); } }
public void GenerateLemons(int numberOfItem) { for (int i = 0; i < numberOfItem; i++) { Lemons lemon = new Lemons(); inventory.lemons.Add(lemon); } }
public Store(Player player) { this.player = player; lemons = new Lemons(); sugar = new Sugar(); ice = new IceCubes(); cups = new Cups(); }
public void AddLemonsToInventory(int amountOfLemons) { for (int i = 0; i < amountOfLemons; i++) { Lemons lemons = new Lemons(); player.inventory.lemons.Add(lemons); } }
// Constructors public Store() { cups = new Cups(); lemons = new Lemons(); sugar = new Sugar(); ice = new Ice(); Console.WriteLine("Initialized Store."); }
public void LemonsRequired(int AmountOfLemonsNeeded) { for (int i = 0; i < AmountOfLemonsNeeded; i++) { Lemons lemon = new Lemons(); lemons.Add(lemon); } Console.WriteLine("Right now you have {0} lemons. \n\n", lemons.Count); }
public void PurchaseLemons(Store store, Player player, Lemons lemons, string amountToPurchase, int amountToPurchaseInt) { amountToPurchase = userInterface.DisplayStoreItem(store.lemons, store.lemonPrices, store.lemonAmount); if (amountToPurchase != "0") { amountToPurchaseInt = Int32.Parse(amountToPurchase); player.WithDrawMoney(store.lemonPrices[amountToPurchaseInt - 1]); AdjustLemonAmount(store, lemons, amountToPurchaseInt, store.lemonAmount[amountToPurchaseInt - 1]); } }
//Constructor public Game() { iceCubes = new IceCubes(); lemons = new Lemons(); sugar = new Sugar(); cups = new Cups(); weather = new Weather(); playerOne = new Player(); itemStore = new Store(iceCubes, lemons, cups, sugar, playerOne); userInterface = new UserInterface(playerOne, weather); day = new Day(playerOne, weather, customer); }
//constructor public Game() { store = new Store(); userInterface = new UserInterface(); // weather = new Weather(); player = new Player(); amountOfDaysInGame = 0; dayNumber = 1; lemons = new Lemons(); sugar = new Sugar(); iceCubes = new IceCubes(); cups = new Cups(); }
public void SellLemons(Player player, int numberOfLemons) { if (player.wallet.cash >= Lemons.price * numberOfLemons) { for (int i = 0; i < numberOfLemons; i++) { Lemons lemon = new Lemons(); player.inventory.lemon.Add(lemon); player.wallet.cash -= Lemons.price; } } Console.WriteLine($"You now have {player.inventory.lemon.Count} lemons, and your wallet balance is ${player.wallet.cash}"); }
public void BuyLemons(Store store) { Console.WriteLine("How much lemons do you want: "); int lemonsAmount = Convert.ToInt32(Console.ReadLine()); capital = capital - (lemonsAmount * store.lemonsPrice); Console.WriteLine("You have " + capital); for (int i = 0; i < lemonsAmount; i++) { Lemons lemons = new Lemons(); inventory.lemonsList.Add(lemons); } Console.WriteLine("Your inventory now has " + inventory.lemonsList.Count + "lemons"); }
public void BuyLemons() { int numberOfLemons = NumberOfLemonsNeeded(); Lemons lemons = new Lemons(); enoughMoney = player.CheckIfEnoughMoney(numberOfLemons, lemons.LemonCost); if (enoughMoney == true) { player.GenerateLemons(numberOfLemons); PurchaseLemons = (numberOfLemons) * lemons.LemonCost; player.wallet.money = player.wallet.money - PurchaseLemons; } player.DisplayInventory(); PurchaseInventory(); }
public void SellLemons(Player player) { //Subtract money from player wallet Console.WriteLine("How many lemons would you like to buy?"); int boughtLemons = int.Parse(Console.ReadLine()); for (int i = 0; i < boughtLemons; i++) { Lemons lemons = new Lemons(); } player.inventory.lemons.Add(lemons); player.wallet.cashInWallet -= (boughtLemons * player.inventory.lemons[0].price); //to do: set prices for each item }
public void Item() {//subtract amount from wallet Lemons lemons = new Lemons("10- $1, 20- $2, 50- $5"); Sugar sugar = new Sugar("4c- $1, 12c-$3, 20c- $5"); Cups cups = new Cups("50- $1, 150- $3, 250- $5"); Ice ice = new Ice("90- $.90, 210- $2.10, 390- $3.90"); List <Item> items = new List <Item>(); items.Add(Lemons); items.Add(Sugar); items.Add(Ice); items.Add(Cups); foreach (Item item in items) { Console.WriteLine("Cost: " + item.cost);; } }
public void RunDay(Store store, Player player, int dayNumber, Lemons lemons, IceCubes iceCubes, Sugar sugar, Cups cups) { moneyInWalletAtStart = player.Money; weather.DetermineForecast(); userInterface.DisplayBeginningOfDayInfo(weather.forecast, weather.highTemperatureForecast, dayNumber, player.Money); userInterface.ShowRecipe(lemonsPerPitcher, cupsSugarPerPitcher, iceCubesPerGlass, pricePerCup); ChangeRecipe(); userInterface.ShowRecipe(lemonsPerPitcher, cupsSugarPerPitcher, iceCubesPerGlass, pricePerCup); PurchaseFromStore(store, player, lemons, iceCubes, sugar, cups); userInterface.DisplayInventory(cups.currentStock, lemons.currentStock, sugar.currentStock, iceCubes.currentStock); DetermineGlassesPerPitcher(); DeterminePotentialCustomers(); DetermineCupsSold(); AddProfit(player); player.FindProfit(moneyInWalletAtStart); lemons.DecreaseInventory(cupsSold, pitcherLooper, lemonsPerPitcher); sugar.DecreaseInventory(cupsSold, pitcherLooper, cupsSugarPerPitcher); cups.DecreaseInventory(cupsSold); iceCubes.DecreaseInventory(cupsSold, iceCubesPerGlass); GetPopularity(); userInterface.DisplayEndOfDayInfo(CheckForSoldOut(iceCubes.currentStock, lemons.currentStock, sugar.currentStock, cups.currentStock), weather.forecast, weather.highTemperatureForecast, dayNumber, player.Money, player.Profit, cupsSold, popularity); }
public int AdjustLemonAmount(Store store, Lemons lemons, int amountToPurchaseInt, int itemsToAdd) { lemons.currentStock += itemsToAdd; return(lemons.currentStock); }