Esempio n. 1
0
        public void ChoosingTemperature()
        {
            int result = rng.Next(50, 100);

            temperature = result;
            Userinterface.DisplayRandomTemperature(temperature);
        }
Esempio n. 2
0
        public void GameMenu()
        {
            Userinterface.DisplayGameMenu();
            int menu = Userinterface.DisplayInput();

            switch (menu)
            {
            case 1:
                Store store = new Store(player);
                store.Menu();

                break;

            case 3:
                DisplayWeather();
                break;

            case 2:
                player.receipe.SetRecipe();


                break;

            case 4:

                break;
            }
        }
Esempio n. 3
0
        public void ChoosingWeather()
        {
            int index = rand.Next(weatherConditions.Count);

            condition = weatherConditions[index];
            Userinterface.DisplayRandomConditions(condition);
        }
Esempio n. 4
0
        public void BuyLemons()
        {
            int amount = Userinterface.PurchasingLemons();

            // check wallet to see if user has enough money to buy this amount of lemons
            if (player.wallet.moneyInWallet >= priceOfLemons)
            {
                Console.WriteLine("success in buying lemons");
            }
            else
            {
                Console.WriteLine("You need more money");
            }



            for (int i = 0; i <= amount; i++)
            {
                player.inventory.lemons.Add(new Lemon());
            }

            player.wallet.moneyInWallet -= amount;

            Menu();
        }
Esempio n. 5
0
        public void Menu()
        {
            bool storeActive = true;

            while (storeActive)
            {
                Userinterface.DisplayStoreMenu();
                int choice = Userinterface.GetIntegerInput();
                switch (choice)
                {
                case 1:
                    Userinterface.DisplayInventory(player.inventory);

                    break;

                case 2:
                    BuyLemons();

                    break;

                case 3:
                    BuySugarCubes();

                    break;

                case 4:

                    BuyIceCubes();

                    break;

                case 5:
                    BuyCups();

                    break;

                case 6:
                    storeActive = false;
                    break;

                default:
                    Menu();
                    break;
                }
            }
        }
Esempio n. 6
0
        public void BuyCups()
        {
            int amount = Userinterface.PurchasingCups();

            if (player.wallet.moneyInWallet >= priceOfCups)
            {
                Console.WriteLine("success in buying SugarCubes");
            }
            else
            {
                Console.WriteLine("You need more money");
            }



            for (int i = 0; i <= amount; i++)
            {
                player.inventory.cups.Add(new Cup());
            }
            player.wallet.moneyInWallet -= amount;
            Menu();
        }
Esempio n. 7
0
        //Member Methods

        public void RunGame()
        {
            Userinterface.DisplayRules();
            player.EnterName();
            GameMenu();
        }