The Ship class



Rather than expect everyone to program the robot from scratch we have provided a class that provides some underlying functionality. The Ship class so called because it is a basic model of a Ship should be the starting point for your programs. The full documentation of the class is provided but all you need to start with are the basic methods to control the Ship.

setCourse(int heading)

Causes the robot to rotate on its own axis to face along the given heading (in degrees).

setPower(int speed)

Sets the speed of the robot to the given speed. If a speed of zero is supplied then the robot stops.

move()

Causes the robot to move in the direction in which it is facing at the speed specified by speed.

pause(int millis)

Does nothing for the specified number of milli seconds.