Example #1
0
        /// <summary>
        /// Initializes the current game specifing the hero's name and the skill file path.
        /// </summary>
        /// <param name="heroName">Name of the hero.</param>
        /// <param name="skillFilePath">Path of the file containing the skills.</param>
        public GameManager(string heroName, string skillFilePath = "")
        {
            // Complete initialization of the managers
            SkillService.Initialize(skillFilePath);
            IOManager     = new ConsoleManager(this);
            CombatManager = new CombatManager(IOManager);

            // Default hero created for the game
            Hero = new Hero()
            {
                Name          = heroName,
                MaxHealth     = 15,
                CurrentHealth = 15,
                Skills        = new List <string>()
                {
                    "Unarmed attack",
                    "Fireball"
                }
            };
        }