zork2Class
Class Item

java.lang.Object
  |
  +--zork2Class.Item

public class Item
extends java.lang.Object

the class Item creation :5 mai 03 at 17:54:16

Version:
1.0
Author:
Michel de VERDELHAN

Constructor Summary
Item(java.lang.String itName, java.lang.String itDescription)
          Constructor Item.
 
Method Summary
 boolean couldBeCross()
          Method couldBeCross.
 java.lang.String getDescription()
          Returns the itemDescription.
 int getDexterityAdd()
          Returns the dexterityAdd.
 int getEnergyAdd()
          Returns the energyAdd.
 java.awt.Image getImage()
          Returns the image.
 int getIntelligenceAdd()
          Returns the intelligenceAdd.
 java.lang.String getName()
          Returns the itemName.
 int getPowerWeapon()
          Returns the powerWeapon.
 int getStrengthAdd()
          Returns the strengthAdd.
 int getValue()
          Returns the itemValue.
 int getWeigth()
          Returns the itemWeigth.
 boolean isMap()
          Returns the isMap.
 boolean isWeapon()
          Method isWeapon, this method check if that Item could be a weapon.
 void setDescription(java.lang.String description)
          Sets the itemDescription.
 void setDexterityAdd(int dexterityAdd)
          Sets the dexterityAdd.
 void setEnergyAdd(int energyAdd)
          Sets the energyAdd.
 void setImage(java.awt.Image image)
          Sets the image.
 void setImage(java.lang.String image)
          Sets the image.
 void setIntelligenceAdd(int intelligenceAdd)
          Sets the intelligenceAdd.
 void setIsMap(boolean isMap)
          Sets the isMap.
 void setName(java.lang.String name)
          Sets the itemName.
 void setPowerWeapon(int powerWeapon)
          Sets the powerWeapon.
 void setStrengthAdd(int strengthAdd)
          Sets the strengthAdd.
 void setValue(int value)
          Sets the itemValue.
 void setWeigth(int weigth)
          Sets the itemWeigth.
 java.lang.String toString()
          method :Item toString
return the item as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Item

public Item(java.lang.String itName,
            java.lang.String itDescription)
Constructor Item.

Method Detail

couldBeCross

public boolean couldBeCross()
Method couldBeCross.
if the item can be crossed by the player

Returns:
boolean true if player can cross item else false

isWeapon

public boolean isWeapon()
Method isWeapon, this method check if that Item could be a weapon. It return true if this Item could serve as a weapon.

Returns:
boolean true if item can be used as weapon else false

toString

public java.lang.String toString()
method :Item toString
return the item as a string

Overrides:
toString in class java.lang.Object
Returns:
String representing the item
Since:
12 mai 03 at 22:11:33
See Also:
Object.toString()

getDexterityAdd

public int getDexterityAdd()
Returns the dexterityAdd.

Returns:
int

getEnergyAdd

public int getEnergyAdd()
Returns the energyAdd.

Returns:
int

getImage

public java.awt.Image getImage()
Returns the image.

Returns:
Image

getIntelligenceAdd

public int getIntelligenceAdd()
Returns the intelligenceAdd.

Returns:
int

isMap

public boolean isMap()
Returns the isMap.

Returns:
boolean

getDescription

public java.lang.String getDescription()
Returns the itemDescription.

Returns:
String

getName

public java.lang.String getName()
Returns the itemName.

Returns:
String

getValue

public int getValue()
Returns the itemValue.

Returns:
int

getWeigth

public int getWeigth()
Returns the itemWeigth.

Returns:
int

getStrengthAdd

public int getStrengthAdd()
Returns the strengthAdd.

Returns:
int

getPowerWeapon

public int getPowerWeapon()
Returns the powerWeapon.

Returns:
int

setDexterityAdd

public void setDexterityAdd(int dexterityAdd)
Sets the dexterityAdd.

Parameters:
dexterityAdd - The dexterityAdd to set

setEnergyAdd

public void setEnergyAdd(int energyAdd)
Sets the energyAdd.

Parameters:
energyAdd - The energyAdd to set

setImage

public void setImage(java.awt.Image image)
Sets the image.

Parameters:
image - The image to set

setImage

public void setImage(java.lang.String image)
Sets the image.

Parameters:
image - The image to set

setIntelligenceAdd

public void setIntelligenceAdd(int intelligenceAdd)
Sets the intelligenceAdd.

Parameters:
intelligenceAdd - The intelligenceAdd to set

setIsMap

public void setIsMap(boolean isMap)
Sets the isMap.

Parameters:
isMap - The isMap to set

setDescription

public void setDescription(java.lang.String description)
Sets the itemDescription.


setName

public void setName(java.lang.String name)
Sets the itemName.


setValue

public void setValue(int value)
Sets the itemValue.


setWeigth

public void setWeigth(int weigth)
Sets the itemWeigth.


setStrengthAdd

public void setStrengthAdd(int strengthAdd)
Sets the strengthAdd.

Parameters:
strengthAdd - The strengthAdd to set

setPowerWeapon

public void setPowerWeapon(int powerWeapon)
Sets the powerWeapon.

Parameters:
powerWeapon - The powerWeapon to set