Class UrRobot
In: karel/ur_robot.rb
Parent: Robota

The simplest kind of instantiable robot. Has all of the capabilities defined in Robota

Methods

Included Modules

Observable

Public Class methods

Place a robot at a given corner (street, avenue) facing a given direction, with an initial number of beepers in its beeper bag

Public Instance methods

Move one block in the current direction (provided the front is clear)

Returns a collection of the other robots on the same corner as this robot if a block is given, the block will be applied to each neighbor

Pick a beeper from the current corner (provided there is one to pick)

Put a beeper on the current corner (provided the robot has one in the beeper bag)

Turn 90 degrees to the left from the current direction

Turn off, making further actions impossible

[Validate]