Class StairSweeper

java.lang.Object
  extended by greenfoot.Actor
      extended by UrRobot
          extended by StairSweeper

public class StairSweeper
extends UrRobot

A StairSweeper knows how to climb one stair and pick a beeper from it. This is a sample illustration of one way to use this system. Note that the Greenfoot Run command/button is not useful with this class. Use the Act command/button.

Version:
1.0 (Greenfoot) January 2010
Author:
Joseph Bergin

Constructor Summary
StairSweeper()
           
 
Method Summary
 void act()
          Act - Climb exactly three stairs, picking a beeper from each.
 void climbStair()
          Climb one stair
static void getStairs()
          Convenience method to get an appropriate world for the StairSweeper.
 
Methods inherited from class UrRobot
addedToWorld, learnLocation, move, pickBeeper, putBeeper, setLocation, sleep, turnLeft, turnOff
 
Methods inherited from class greenfoot.Actor
getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getX, getY, intersects, setImage, setImage, setRotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StairSweeper

public StairSweeper()
Method Detail

act

public void act()
Act - Climb exactly three stairs, picking a beeper from each. The stairworld.kwld file contains a suitable world.

Overrides:
act in class UrRobot

climbStair

public void climbStair()
Climb one stair


getStairs

public static void getStairs()
Convenience method to get an appropriate world for the StairSweeper.