Beispiel #1
0
        public void GoToTheStore(Store TheStore)
        {
            Console.WriteLine("Welcome to Walmart!");
            List <double> lemonsAndCost = TheStore.BuyLemons();

            PlayerInventory.lemons       += lemonsAndCost[0];
            PlayerInventory.currentMoney -= lemonsAndCost[1];
            PlayerInventory.moneySpent   += lemonsAndCost[1];

            List <double> sugarAndCost = TheStore.BuySugar();

            PlayerInventory.sugar        += sugarAndCost[0];
            PlayerInventory.currentMoney -= sugarAndCost[1];
            PlayerInventory.moneySpent   += sugarAndCost[1];

            List <double> cupsAndCost = TheStore.BuyGlasses();

            PlayerInventory.cups         += cupsAndCost[0];
            PlayerInventory.currentMoney -= cupsAndCost[1];
            PlayerInventory.moneySpent   += cupsAndCost[1];

            List <double> iceAndCost = TheStore.BuyIce();

            PlayerInventory.ice          += iceAndCost[0];
            PlayerInventory.currentMoney -= iceAndCost[1];
            PlayerInventory.moneySpent   += iceAndCost[1];
        }