Constructor and Description |
---|
Item()
creates a default item with effect value of 10
and has not been used.
|
Item(boolean CanUse)
creates an item with the default effect value of 10
and the computer/player decides on whether it has been used
and is an item game piece with icon I
|
Item(int NewEffect)
creates an item with an effect value of the user's choice
and has not been used and is an item game piece with icon I
|
Modifier and Type | Method and Description |
---|---|
int |
getEffect()
gets the item's effect value
|
char |
getIcon()
This is the getter to figure out what piece icon it is.
|
String |
getTypeOfPiece()
this tells what kind of piece it is
|
boolean |
getUse()
this gets whether or not the item has been used
|
void |
setEffect(int NewEffect)
sets the item's effect value
|
void |
setIcon(char NewIcon)
This is the setter for the Icon it will be
|
void |
setTypeOfPiece(String newTypeOfPiece)
this allows the computer/programmer to set what type of piece this will be
|
void |
setUse(boolean use)
this sets whether the item has been used or not
|
void |
UseEffect(Player p)
this method uses the effect value in someway.
|
public Item()
public Item(int NewEffect)
NewEffect
- this will be how much the item will effect the user.public Item(boolean CanUse)
CanUse
- tells whether the item has been usedpublic int getEffect()
public void setEffect(int NewEffect)
NewEffect
- this is the value the computer/programmer can setpublic void setUse(boolean use)
use
- this is a true or false statement that tells whether
the item has been used.public boolean getUse()
public String getTypeOfPiece()
getTypeOfPiece
in interface GamePiece
public void setTypeOfPiece(String newTypeOfPiece)
setTypeOfPiece
in interface GamePiece
newTypeOfPiece
- this will be the name of this piecepublic char getIcon()
public void setIcon(char NewIcon)
public void UseEffect(Player p)
p
- the player to be affected by the item