/// <summary> /// The entry point for the controller and called on every tikc /// </summary> /// <param name="gs">The game state that we are going to be focusing on</param> /// <returns>Returns the direction that the Pacman agent is meant to be going in</returns> public override Direction Think(Pacman.Simulator.GameState gs) { Direction _returnDirection = Direction.None; _currentPossibleDirections = gs.Pacman.PossibleDirections(); _gameState = gs; _returnDirection = CallState(_currentAgentState, gs); _previousGameState = gs; _previousPossibleDirections = gs.Pacman.PossibleDirections(); _milliseconds += GameState.MSPF; if (!RemainQuiet) { UpdateConsole(); } return(_returnDirection); }