private void Run(string program, int stepsCount, out GameState our, out GameState mars)
        {
            var programStartInfos = new[] { new ProgramStartInfo {
                                                Program = program, StartAddress = 0
                                            } };
            var ourGame = new Game(programStartInfos);
            var rules   = new Rules
            {
                WarriorsCount = 1,
                Rounds        = 1,
                MaxCycles     = 80000,
                CoreSize      = 8000,
                PSpaceSize    = 500,              // coreSize / 16
                EnablePSpace  = false,
                MaxProcesses  = 1000,
                MaxLength     = 256,
                MinDistance   = 100,
                Version       = 93,
                ScoreFormula  = ScoreFormula.Standard,
                ICWSStandard  = ICWStandard.ICWS88,
            };
            var marsGame = new MarsGame(rules, programStartInfos);

            ourGame.Step(stepsCount);
            marsGame.Step(stepsCount);
            our  = ourGame.GameState;
            mars = marsGame.GameState;
        }
Esempio n. 2
0
        protected static GameState GetFinalGameStateByMars([NotNull] Rules rules, [NotNull] Battle battle)
        {
            var programStartInfos = battle.GetProgramStartInfos();
            var game = new MarsGame(rules, programStartInfos);

            game.StepToEnd();
            return(game.GameState);
        }