Ejemplo n.º 1
0
 private static void BossSpeaks(Boss boss)
 {
     Console.BackgroundColor = ConsoleColor.Red;
     Console.ForegroundColor = ConsoleColor.Black;
     Console.Write("{0}:", boss.Name);
     Console.ResetColor();
 }
Ejemplo n.º 2
0
        private void InitBosses()
        {
            HashSet<string> names = new HashSet<string>();
            HashSet<string> awards = new HashSet<string>();

            for (int level = 1; level <= 5; level++)
            {
                if (level == 5)
                {
                    Bosses[level-1] = new Boss(Resources.GetFinalBoss(), level, "\"True Programmer\" title");
                    break;
                }

                string name = Resources.GetRandomBoss();
                while (names.Contains(name))
                {
                    name = Resources.GetRandomBoss();
                }
                names.Add(name);
                string award = Resources.GetRandomAward();
                while (awards.Contains(award))
                {
                    award = Resources.GetRandomAward();
                }
                awards.Add(award);

                Bosses[level-1] = new Boss(name, level, award);
            }
        }