Ejemplo n.º 1
0
        public Point GetOutput(int turn)
        {
            Point result;

            if (_replayData.OutputLines.Count <= turn + 1)
            {
                return(Point.Zero);
            }

            if (!ReplayMatchData.TryParsePoint(_replayData.OutputLines[turn + 1], out result))
            {
                return(Point.Zero);
            }
            return(result);
        }
Ejemplo n.º 2
0
        public override void StartTurn()
        {
            IsRunning = true;
            OutPut    = Point.Zero;
            if (CurrentHead < _replayData.OutputLines.Count)
            {
                Point result;
                var   aiLogger = CurrentField.AiLogger;
                aiLogger.InputLogger.WriteLine(CurrentField.GenerateTurnInfoString());
                aiLogger.OutputLogger.WriteLine(_replayData.OutputLines[CurrentHead]);

                if (!ReplayMatchData.TryParsePoint(_replayData.OutputLines[CurrentHead], out result))
                {
                    CurrentHead = int.MaxValue;
                    IsRunning   = false;
                    return;
                }
                OutPut = result;
                CurrentHead++;
            }

            IsRunning = false;
        }