Esempio n. 1
0
        static void Main(string[] args)
        {
            Console.Title = "I love Tamagotchi super motchi, and so should you.";
            Console.WriteLine("Hi there!");
            Console.WriteLine("Well what do we have here hm? Someone looking to take care of a Tamagotchi?");
            Console.WriteLine("Good luck with that... They die if their boredom or hunger reaches a value of 10. Whatever that means.");
            Console.WriteLine("Press enter and this creature will be yours! (At least try not to kill it)");
            Console.ReadLine();
            Console.Clear();

            Tamagotchi tg = new Tamagotchi();

            Console.WriteLine("This here is your new best friend. (No seeing, only imagining)");
            Console.WriteLine("What will you name them?");
            tg.name = Console.ReadLine();

            Console.WriteLine();
            Console.WriteLine("Wonderful.");
            Console.WriteLine("Now, there are a couple different things you can do while you spend time with your new bff.");

            while (tg.GetAlive() == true)
            {
                tg.PrintStats();

                Console.WriteLine();
                Console.WriteLine("What do you want to do?");
                Console.WriteLine("1. Say hello");
                Console.WriteLine("2. Feed them");
                Console.WriteLine("3. Teach them a word (no profanities please)");
                Console.WriteLine("4. Nothing at all");
                string action = Console.ReadLine();

                while (action != "1" && action != "2" && action != "3" && action != "4")
                {
                    Console.WriteLine("Hey now, I can only work with numeric answers. Please correct yourself.");
                    action = Console.ReadLine();
                }
                Console.Clear();

                if (action == "1")
                {
                    tg.Hi();
                }

                if (action == "2")
                {
                    tg.Feed();
                }

                if (action == "3")
                {
                    Console.WriteLine("What verbal wisdom do you have to offer your tamagotchi?");
                    string word = Console.ReadLine();
                    tg.Teach(word);
                    Console.WriteLine("Wow. Such wisdom. I am amazed.");
                }

                if (action == "4")
                {
                    Console.WriteLine("Alright. Nothing it is!");
                    Console.WriteLine("Time has now passed.");
                    Console.WriteLine("You are older. (but not by very much)");
                }

                Console.WriteLine("Press enter to continue.");
                Console.ReadLine();

                tg.Tick();
                Console.Clear();
            }

            tg.PrintStats();
            Console.WriteLine("It seems one or more of your tamagotchi's values have reached the limit.");
            Console.WriteLine("Dude, I thought I told you to keep them below 10.");
            Console.WriteLine("Well, nothing to do about it now. See you next time!");
            Console.ReadLine();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Console.Title = "It's Tamagotchi Time!! (it always is)";
            Console.WriteLine("Welcome to Tamagotchi Planet!");
            Console.WriteLine("Here you get to take care of your very own Tamagotchi! They are very helpless on their own and need someone to keep them alive, no pressure. :)");
            Console.WriteLine("If it's hunger or boredom reaches 10, well......... let's just say that nothing good can ever come from that.");
            Console.WriteLine();
            Console.WriteLine("Press enter to adopt your first Tamagotchi!");
            Console.ReadLine();
            Console.Clear();

            Tamagotchi tg1 = new Tamagotchi();

            Console.WriteLine("Wow!");
            Console.WriteLine("What's their name?");
            tg1.name = Console.ReadLine();

            Console.WriteLine();
            Console.WriteLine("Such a wonderful name!");
            Console.WriteLine("So...");

            while (tg1.GetAlive() == true)
            {
                tg1.PrintStats();
                Console.WriteLine();
                Console.WriteLine("What do you want to do?");
                Console.WriteLine("     1. Say hi to " + tg1.name + ".");
                Console.WriteLine("     2. Feed " + tg1.name + ".");
                Console.WriteLine("     3. Teach " + tg1.name + " a word.");
                Console.WriteLine("     4. Sit in silence and contemplate existance.");

                string action = Console.ReadLine();

                while (action != "1" && action != "2" && action != "3" && action != "4")
                {
                    Console.WriteLine("Answer with the number associated to the action you want to take, please!");
                    action = Console.ReadLine();
                }

                Console.Clear();
                Console.WriteLine();

                if (action == "1")
                {
                    tg1.Hi();
                }

                if (action == "2")
                {
                    tg1.Feed();
                }

                if (action == "3")
                {
                    Console.WriteLine("What word do you want to teach " + tg1.name + "?");
                    string word = Console.ReadLine();
                    tg1.Teach(word);
                    Console.WriteLine("You repeat the word a handful (you've got very big hands) of times and " + tg1.name + " sure knows this word well now! (you hope)");
                }

                if (action == "4")
                {
                    Console.WriteLine("You contemplate your existance for a bit...");
                    for (int i = 0; i < 10; i++)
                    {
                        Console.WriteLine();
                    }
                    Console.WriteLine("Well that was fun! Nothing like existential dread early on a tuesday morning. :)");
                }

                Console.ReadLine();

                tg1.Tick();
                Console.Clear();
            }

            Console.WriteLine("Well, woopsies! Let's take a look here.");
            tg1.PrintStats();
            Console.WriteLine();
            Console.WriteLine("Hm. Well.");

            Console.WriteLine();
            Console.WriteLine("Goodbye then!");


            Console.ReadLine();
        }