Interface IBasicRobot

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      IBasicEvents getBasicEventListener()
      This method is called by the game to notify this robot about basic robot event.
      java.lang.Runnable getRobotRunnable()
      This method is called by the game to invoke the run() method of your robot, where the program of your robot is implemented.
      void setOut​(java.io.PrintStream out)
      Do not call this method!
      void setPeer​(IBasicRobotPeer peer)
      Do not call this method! Your robot will simply stop interacting with the game.
    • Method Detail

      • getRobotRunnable

        java.lang.Runnable getRobotRunnable()
        This method is called by the game to invoke the run() method of your robot, where the program of your robot is implemented.
        Returns:
        a runnable implementation
        Since:
        1.6
        See Also:
        Runnable.run()
      • getBasicEventListener

        IBasicEvents getBasicEventListener()
        This method is called by the game to notify this robot about basic robot event. Hence, this method must be implemented so it returns your IBasicEvents listener.
        Returns:
        listener to basic events or null if this robot should not receive the notifications.
        Since:
        1.6
      • setPeer

        void setPeer​(IBasicRobotPeer peer)
        Do not call this method! Your robot will simply stop interacting with the game.

        This method is called by the game. A robot peer is the object that deals with game mechanics and rules, and makes sure your robot abides by them.

        Parameters:
        peer - the robot peer supplied by the game
      • setOut

        void setOut​(java.io.PrintStream out)
        Do not call this method!

        This method is called by the game when setting the output stream for your robot.

        Parameters:
        out - the new output print stream for this robot
        Since:
        1.6