Ejemplo n.º 1
0
        private void Gamestart()
        {
            Console.WriteLine("Welcome to the kitchen!");
            Console.ReadLine();
            Console.Clear();

            int option1;
            int option2;
            int option3;
            int option4;
            int option5;
            int option6;
            int option7;


            Console.WriteLine("What is your name?");
            string playerNameCreate = Console.ReadLine();

            Console.WriteLine("What is your cooking age?"); // How many years of cooking experience do you have?
            int playerCookingAgeCreate = Convert.ToInt16(Console.ReadLine());

            Console.Clear();

            Property player = new Property(playerNameCreate, playerCookingAgeCreate);

            player.playerInfo();
            Console.ReadKey();
            Console.Clear();

            Story arrayStory = new Story();

            arrayStory.myStorylines();

            player.show();

            Console.WriteLine(arrayStory.myStoryline[0]);

            option1 = Convert.ToInt16(Console.ReadLine());


            if (option1 == 1)
            {
                Console.Clear();
                player.show();
                Console.WriteLine("Lucky! You find your soup pot!");
                Console.WriteLine(arrayStory.myStoryline[1]);

                option2 = Convert.ToInt16(Console.ReadLine());

                if (option2 == 1)
                {
                    Console.Clear();
                    player.show();
                    Console.WriteLine("please continue to try if the neighbor is not at home");
                    Console.WriteLine(arrayStory.myStoryline[1]);
                }

                else if (option2 == 2)
                {
                    Console.Clear();
                    player.show();
                    Console.WriteLine("You get all the ingredients!");
                    Console.WriteLine(arrayStory.myStoryline[2]);

                    option3 = Convert.ToInt16(Console.ReadLine());

                    if (option3 == 1)
                    {
                        Console.Clear();
                        player.show();
                        Console.WriteLine("Of Coure you should boil water first");
                        Console.WriteLine(arrayStory.myStoryline[3]);

                        option4 = Convert.ToInt16(Console.ReadLine());

                        if (option4 == 1)
                        {
                            Console.Clear();
                            player.show();
                            Console.WriteLine("Correct, soup's aroma +2");
                            player.AddAroma(2);
                            Console.WriteLine(arrayStory.myStoryline[4]);

                            option5 = Convert.ToInt16(Console.ReadLine());

                            if (option5 == 1)
                            {
                                Console.Clear();
                                player.show();
                                Console.WriteLine("The taste is too strong, please try again.");
                                Console.ReadLine();
                            }

                            else
                            {
                                Console.Clear();
                                player.show();
                                Console.WriteLine("The taste is good. soup's taste +2");
                                player.AddTaste(2);
                                Console.WriteLine(arrayStory.myStoryline[5]);

                                option6 = Convert.ToInt16(Console.ReadLine());

                                if (option6 == 1)
                                {
                                    Console.Clear();
                                    player.show();
                                    Console.WriteLine("Correct. Soup's appearance +2");
                                    player.AddAppearance(2);
                                    Console.WriteLine(arrayStory.myStoryline[6]);

                                    option7 = Convert.ToInt16(Console.ReadLine());

                                    if (option7 == 1)
                                    {
                                        Console.Clear();
                                        player.show();
                                        Console.WriteLine("You have successful made delicious soup! Today birthday party will be wonderful! Everone will like this decious soup!");
                                        Console.ReadLine();
                                    }

                                    else
                                    {
                                        Console.Clear();
                                        player.show();
                                        Console.WriteLine("The stewing times is too long, please try again.");
                                        Console.ReadLine();
                                    }
                                }

                                else
                                {
                                    Console.Clear();
                                    player.show();
                                    Console.WriteLine("The color is wrong, please try again.");
                                    Console.ReadLine();
                                }
                            }
                        }

                        else
                        {
                            Console.Clear();
                            player.show();
                            Console.WriteLine("The temperature is not suitable, please continue to try.");
                            Console.ReadLine();
                        }
                    }
                    else
                    {
                        Console.Clear();
                        player.show();
                        Console.WriteLine("The pot is too hot and the ingredients are burnt.");
                        Console.ReadLine();
                    }
                }
                else if (option2 == 3)
                {
                    Console.Clear();
                    player.show();
                    Console.WriteLine("Well, the vegetables is not ready to harvest! You need to find your ingredients at another place.");
                    Console.ReadLine();
                }
                else
                {
                    Console.WriteLine("Please choose among the three options.");
                    Console.ReadLine();
                }
            }


            else if (option1 == 2)
            {
                Console.Clear();
                player.show();
                Console.WriteLine("Well , it's not here, you need keep look around!");
                Console.ReadLine();
            }

            else if (option1 == 3)
            {
                Console.Clear();
                player.show();
                Console.WriteLine("Well , it's not here, you need keep look around!");
                Console.ReadLine();
            }

            else
            {
                Console.WriteLine("Please choose among the three options.");
                Console.ReadLine();
            }
        }