public static void SerializeToFile(string filename, Strategy strategy, FightStat fightStat)
 {
     File.WriteAllLines(filename, new[]
     {
         fightStat.ToString(),
         string.Join(" ", strategy.commands)
     });
 }
Exemple #2
0
        public GameVisualiser(Battle battle)
        {
            width  = (battle.Map.Width + 2) * spriteMultiplier;
            height = (battle.Map.Height + 2) * spriteMultiplier;

            graphics = new GraphicsDeviceManager(this)
            {
                PreferredBackBufferWidth  = Math.Max(width, 700),
                PreferredBackBufferHeight = height + 50,
                IsFullScreen = false
            };

            this.battle           = battle;
            Content.RootDirectory = "Content";
            FieldBuilder          = new FieldBuilder();
            fightStat             = new FightStat();
        }