Acme-RTB

 view release on metacpan or  search on metacpan

RTB/RTB.pm  view on Meta::CPAN

=head3 Info [time (double)] [speed (double)] [cannon angle (double)]

The Info message does always follow the Radar message. It gives more general information on the state of the robot. The time is the game-time elapsed since the start of the game. This is not necessarily the same as the real time elapsed, due to time ...

=head3 Coordinates [x (double)] [y (double)] [angle (double)]

Tells you the current robot position. It is only sent if the option Send robot coordinates is 1 or 2. If it is 1 the coordinates are sent relative the starting position, which has the effect that the robot doesn't know where it is starting, but only ...

=head3 RobotInfo [energy level (double)] [teammate? (int)]

If you detect a robot with your radar, this message will follow, giving some information on the robot. The opponents energy level will be given in the same manner as your own energy (see below). The second argument is only interesting in team-mode (w...

=head3 RotationReached [what has reached(int)]

When the robot option SEND_ROTATION_REACHED is set appropriately, this message is sent when a rotation (with RotateTo or RotateAmount) has finished or the direction has changed (when sweeping). The argument corresponds to 'what to rotate' in e.g. Rot...

=head3 Energy [energy level(double)]

The end of each round the robot will get to know its energy level. It will not, however, get the exact energy, instead it is discretized into a number of energy levels.

=head3 RobotsLeft [number of robots (int)]

RTB/RTB.pm  view on Meta::CPAN

        # do other stuff here

}

=over 4

=head2 Rotate [what to rotate (int)] [angular velocity (double)]

=back

Set the angular velocity for the robot, its cannon and/or its radar. Set 'what to rotate' to 1 for robot, 2 for cannon, 4 for radar or to a sum of these to rotate more objects at the same time. The angular velocity is given in radians per second and ...

=over 4

=head2 RotateTo [what to rotate (int)] [angular velocity (double)] [end angle (double)]

=back

As Rotate, but will rotate to a given angle. Note that radar and cannon angles are relative to the robot angle. You cannot use this command to rotate the robot itself, use RotateAmount instead!

=over 4



( run in 0.686 second using v1.01-cache-2.11-cpan-39bf76dae61 )