Class Item
java.lang.Object
|
+----Item
- public class Item
- extends Object
- implements Serializable
Holds one item. Currently there are only three items possible :
"Gold" , "Shield" , "Potion". More items can be added here.
-
d_actions
-
-
d_status
-
-
possible_items
-
-
x
-
-
y
-
-
Item(int, int, String)
- Creates a new item.
-
getOwner()
-
-
isAnItem(String)
-
-
setOwner(Color)
-
-
toString()
-
x
public int x
y
public int y
d_actions
public Vector d_actions
possible_items
public static String possible_items[]
d_status
public boolean d_status
Item
public Item(int x,
int y,
String type)
- Creates a new item.
- Parameters:
- x - the X location on the board.
- y - the Y location on the board.
- type - one of the possible 3 types available.
isAnItem
public static boolean isAnItem(String alegedItem)
toString
public String toString()
- Overrides:
- toString in class Object
setOwner
public void setOwner(Color c)
getOwner
public Color getOwner()