public void Log(MatchRender rendered)
        {
            SaveMap(rendered);
            SaveMapAdvanced(rendered);

            SaveState(rendered);

            SavePlayerOneMove(rendered);
            SavePlayerTwoMove(rendered);
        }
        public void Log(MatchRender rendered)
        {
            FileWriter.WriteLine();
            FileWriter.WriteLine(rendered.Round);
            FileWriter.WriteLine(rendered.Map);

            foreach (var move in rendered.Moves)
            {
                FileWriter.WriteLine(move);
            }
        }
        public void Log(MatchRender rendered)
        {
            WriteToConsoleAndDebug(title);
            WriteToConsoleAndDebug(rendered.MapAdvanced);

            Console.WriteLine();
            Console.WriteLine();

            foreach (var move in rendered.Moves)
            {
                WriteToConsoleAndDebug(move);
            }
        }
        protected void LogWithoutScrolling(MatchRender rendered)
        {
            var line = 0;

            WriteToConsoleAndDebug (0, line++, title);

            WriteToConsoleAndDebug(0, line, rendered.MapAdvanced);
            line += CalculateRenderedMapHeight(rendered.MapAdvanced);

            foreach (var move in rendered.Moves)
            {
                WriteToConsoleAndDebug(0, line++, move);
            }
        }
        public string GetMove(MatchRender rendered)
        {
            OutputFile(_mapFilename, rendered.Map);
            OutputFile(_mapAdvancedFilename, rendered.MapAdvanced);
            OutputFile(_stateFilename, rendered.State);

            _botTimer.Reset();
            _botTimer.Start();

            var process = CreateProcess();
            AddEventHandlersToProcess(process);
            StartProcess(process);
            string result = HandleProcessResponse(process);

            AppendLogs();
            ClearRoundFiles();

            return result;
        }
        public MatchRender Render(IMatch renderMatch)
        {
            var match = (Match)renderMatch;

            var result = new MatchRender
            {
                Map = RenderMap(match),
                MapAdvanced = RenderMapAdvanced(match),
                State = RenderState(match),
                RoundNumber = match.GetRoundNumber(),
                Round = String.Format("Round {0}", match.GetRoundNumber())
            };

            result.Moves[0] = String.Format("Player {0}: {1,-20} > {2}",
                1, match.GetPlayerLastMove(1), match.GetPlayerLastMoveResult(1));
            result.Moves[1] = String.Format("Player {0}: {1,-20} > {2}",
                2, match.GetPlayerLastMove(2), match.GetPlayerLastMoveResult(2));

            return result;
        }
 public void Log(MatchRender rendered)
 {
     LogWithoutScrolling(rendered);
 }
 private void LogAll(MatchRender renderP1)
 {
     foreach (ILogger logger in _loggers)
     {
         logger.Log(renderP1);
     }
 }
 private void GetMove(BotRunner player, MatchRender rendered)
 {
     var move = player.GetMove(rendered);
     Match.SetPlayerMove(player.PlayerNumber, move);
 }
 protected void SaveState(MatchRender rendered)
 {
     WriteFile(rendered.RoundNumber, Settings.Default.StateFilename, rendered.State);
 }
 protected void SavePlayerTwoMove(MatchRender rendered)
 {
     WriteFile(rendered.RoundNumber, Settings.Default.ReplayPlayerTwoMoveFilename, rendered.Moves[1]);
 }
 protected void SaveMapAdvanced(MatchRender rendered)
 {
     WriteFile(rendered.RoundNumber, Settings.Default.MapAdvancedFilename, rendered.MapAdvanced);
 }