edu.fcps.karel2
Class Robot

java.lang.Object
  extended by edu.fcps.karel2.Item
      extended by edu.fcps.karel2.Robot
Direct Known Subclasses:
Athlete, Carpeter, Harvester, Shifter, Swimmer

public class Robot
extends Item


Field Summary
 int beepers
           
 int direction
           
 
Fields inherited from class edu.fcps.karel2.Item
x, y
 
Constructor Summary
Robot()
           
Robot(int x, int y, int dir, int beepers)
           
 
Method Summary
 void explode()
           
 boolean facingEast()
           
 boolean facingNorth()
           
 boolean facingSouth()
           
 boolean facingWest()
           
 boolean frontIsClear()
           
 int getBeepers()
           
 int getDirection()
           
 boolean hasBeepers()
           
 boolean leftIsClear()
           
 void move()
           
 boolean nextToABeeper()
           
 boolean nextToARobot()
           
 void pickBeeper()
           
 void putBeeper()
           
 void render(java.awt.Graphics g, edu.fcps.karel2.util.Coordinate c)
          Renders the Item.
 boolean rightIsClear()
           
 void turnLeft()
           
 
Methods inherited from class edu.fcps.karel2.Item
getX, getY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

beepers

private int beepers

direction

private int direction
Constructor Detail

Robot

public Robot()

Robot

public Robot(int x,
             int y,
             int dir,
             int beepers)
Method Detail

getDirection

public int getDirection()

getBeepers

public int getBeepers()

move

public void move()

turnLeft

public void turnLeft()

putBeeper

public void putBeeper()

pickBeeper

public void pickBeeper()

hasBeepers

public boolean hasBeepers()

frontIsClear

public boolean frontIsClear()

rightIsClear

public boolean rightIsClear()

leftIsClear

public boolean leftIsClear()

nextToABeeper

public boolean nextToABeeper()

nextToARobot

public boolean nextToARobot()

facingNorth

public boolean facingNorth()

facingSouth

public boolean facingSouth()

facingEast

public boolean facingEast()

facingWest

public boolean facingWest()

explode

public void explode()

render

public void render(java.awt.Graphics g,
                   edu.fcps.karel2.util.Coordinate c)
Description copied from class: Item
Renders the Item.

Specified by:
render in class Item