コード例 #1
0
 private void ShowStatsCommand(string entityName)
 {
     if (CheckEntityByName(entityName))
     {
         var entity = Entities.Where(e => e.Name.ToLower() == entityName).FirstOrDefault();
         ConsolePrinter.PrintStats(entity.CharacterName, entity.Stats);
     }
 }
コード例 #2
0
        public Hero SelectCharacterCommand(string playerName)
        {
            ConsolePrinter.PrintMessage("Please select a character with whom to explore the labyrinth:\r\nJames | Lea | Gabriel", false);
            ConsolePrinter.PrintStats("James", new James("").Stats);
            ConsolePrinter.PrintStats("Lea", new Lea("").Stats);
            ConsolePrinter.PrintStats("Gabriel", new Gabriel("").Stats);

            Hero hero = SetCharacter(Console.ReadLine(), playerName);

            ConsolePrinter.PrintAction(hero, "selected", new DefaultHero()
            {
                Name = hero.CharacterName
            }, false);
            ConsolePrinter.PrintMessage("Press enter to start the game.", false);
            Console.ReadLine();

            return(hero);
        }