edu.fcps.karel2
Class Item

java.lang.Object
  extended by edu.fcps.karel2.Item
Direct Known Subclasses:
Robot

public abstract class Item
extends java.lang.Object

The Item class keeps track of an x and y coordinate and provides an abstract render method.


Field Summary
protected  int x
           
protected  int y
           
 
Constructor Summary
Item(int x, int y)
          Constructs an item with the specified x and y coordinates.
 
Method Summary
 int getX()
          Returns the x coordinate.
 int getY()
          Returns the y coordinate.
abstract  void render(java.awt.Graphics g, edu.fcps.karel2.util.Coordinate c)
          Renders the Item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

protected int x

y

protected int y
Constructor Detail

Item

public Item(int x,
            int y)
Constructs an item with the specified x and y coordinates.

Method Detail

getX

public int getX()
Returns the x coordinate.


getY

public int getY()
Returns the y coordinate.


render

public abstract void render(java.awt.Graphics g,
                            edu.fcps.karel2.util.Coordinate c)
Renders the Item.