コード例 #1
0
        public void Tutorial()
        {
            string s = @"You are a communist leader of a communist state. Your descisions affect your popularity.
            The more bad descisions you make the more the people hate you BUT you will gain more from it.
            Makeing nice descisions will affect your relation with other communist states and will affect you
            negatively but make the people happier. The people of your state is on their way to your office
            to kill you. Your goal is to stop them before they reach you and kill you. Making nice descisions
            might spare your life but you will forever be remembered as the weak leader.";

            Console.WriteLine(s);

            Console.WriteLine("");
            Console.WriteLine("You can win the game in these ways:");
            Console.WriteLine("1. Eliminate the resistance in a month");
            Console.WriteLine("2. Get spared by the resistance when they get to your office");
            Console.WriteLine("");
            Console.WriteLine("These are the ways you can lose:");
            Console.WriteLine("1. The resistance kills you");
            Console.WriteLine("2. Get eliminated by other countries which is a result of bad relations with countries");

            Console.WriteLine("");
            Console.WriteLine("Do you want a more advanced tutorial? Type number to procede");
            Console.WriteLine("1) Yes");
            Console.WriteLine("2) No");

            String input = Console.ReadLine();

            if (input == "1")
            {
                MoreTutorial();
            }
            else if (input == "2")
            {
                DayManagerInstance.CreateGame();
            }
            else
            {
                Console.Clear();
                Tutorial();
                Console.ReadKey();
            }
        }
コード例 #2
0
        //After this comment is all the events stored for easy access

        public void Strikes()
        {
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("Your population grows impatient. They decide to strike.");
            Console.ForegroundColor = ConsoleColor.White;

            statsHolder.UnhappyPopulation += Rand.Next(0, 100) + 1;

            Console.WriteLine("");
            Console.WriteLine("What do you want to do?");
            Console.WriteLine("1) Let the strikes procede");
            Console.WriteLine("2) Lower the workload for the workers");
            Console.WriteLine("3) Punish the strikers");
            Console.WriteLine("4) Use military force");

            string input = Console.ReadLine();

            switch (input)
            {
            case "1":
                statsHolder.Stability -= Rand.Next(0, 4) + 1;
                break;

            case "2":
                statsHolder.Stability      += Rand.Next(0, 4) + 1;
                statsHolder.GoodDescisions += 1;
                break;

            case "3":
                statsHolder.Stability         -= Rand.Next(0, 10) + 1;
                statsHolder.UnhappyPopulation += Rand.Next(0, 5) + 1;
                break;

            case "4":
                statsHolder.Stability         -= Rand.Next(0, 10) + 1;
                statsHolder.UnhappyPopulation += Rand.Next(0, 5) + 1;
                break;
            }
            dayManager.CreateGame();
        }