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.


Variable Index

 o d_actions
 o d_status
 o possible_items
 o x
 o y

Constructor Index

 o Item(int, int, String)
Creates a new item.

Method Index

 o getOwner()
 o isAnItem(String)
 o setOwner(Color)
 o toString()

Variables

 o x
 public int x
 o y
 public int y
 o d_actions
 public Vector d_actions
 o possible_items
 public static String possible_items[]
 o d_status
 public boolean d_status

Constructors

 o 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.

Methods

 o isAnItem
 public static boolean isAnItem(String alegedItem)
 o toString
 public String toString()
Overrides:
toString in class Object
 o setOwner
 public void setOwner(Color c)
 o getOwner
 public Color getOwner()