Beispiel #1
0
        static void SelectRules()
        {
            int i = 1;

            Console.WriteLine("Choose a ruleset");
            Dictionary <char, KeyValuePair <string, ISkillSimulator> > list = new Dictionary <char, KeyValuePair <string, ISkillSimulator> >();

            foreach (var pair in simulationRules)
            {
                list[(char)('0' + i++)] = pair;
            }
            while (true)
            {
                foreach (var pair in list)
                {
                    Console.WriteLine($"{pair.Key} - {pair.Value.Key}");
                }
                char selected = Console.ReadKey(true).KeyChar;
                Console.WriteLine();
                if (list.ContainsKey(selected))
                {
                    CurrentSimulationRules = list[selected].Value;
                    return;
                }
            }
        }
Beispiel #2
0
 public BattleSimulator(IGameStateService gameStateService, IMonsterAIService monsterAIService,
                        ILogService logService, ISkillSimulator skillSimulator)
 {
     this.gameStateService = gameStateService;
     this.monsterAIService = monsterAIService;
     this.logService       = logService;
     this.skillSimulator   = skillSimulator;
 }
Beispiel #3
0
 public Battle(ISkillSimulator simulator, double duration)
 {
     this.Simulator      = simulator;
     this.BattleDuration = duration;
 }