Exemplo n.º 1
0
        private static void RunOneGame(int seed, int count, string pc, NullIO io)
        {
            var levels = GenerateLevels(seed, count);

            var playerController = BotLoader.LoadPlayerController(pc);

            var engine = new Engine("~", playerController, levels.First(), io, io);

            engine.GameLoop();
        }
Exemplo n.º 2
0
        public static GameResult RunTestRun(EntryPoint.GameOptions options, int Seed)
        {
            var levels = EntryPoint.GenerateLevels(Seed, options.LevelCount);

            var playerController = BotLoader.LoadPlayerController(options.PlayerController);

            var engine = new Engine(options.PlayerName, playerController, levels.First(), new TrainerRenderer(), new TrainerEventReporter());

            return(engine.GameLoop());
        }
Exemplo n.º 3
0
        private static void RunGame(GameOptions options)
        {
            var levels = GenerateLevels(options.Seed, options.LevelCount);

            var gui = new ConsoleGui(new TextScreen());

            var playerController = options.PlayerController == null ?
                                   new ConsolePlayerController(gui) :
                                   BotLoader.LoadPlayerController(options.PlayerController);

            var engine = new Engine(options.PlayerName, playerController, levels.First(), new ConsoleRenderer(gui), new ConsoleEventReporter(gui));

            engine.GameLoop();
        }