|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectgameLogic.GameObjectType
public class GameObjectType
Represents a type of object that may be present on the board. Examples include Fruit and Wall. Instances of some GameObjectTypes are lethal to collide with, while others might give points if "eaten".
Constructor Summary | |
---|---|
GameObjectType(java.lang.String name,
boolean isLethal)
|
|
GameObjectType(java.lang.String name,
boolean isLethal,
int value)
Constructs a GameObjectType object with the given name, lethality and numeric point value. |
Method Summary | |
---|---|
java.lang.String |
getName()
Returns the name of this GameObjectType, for instance "Fruit" or "Wall". |
int |
getValue()
Gets the number of points objects of this type are worth. |
boolean |
isLethal()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GameObjectType(java.lang.String name, boolean isLethal, int value)
public GameObjectType(java.lang.String name, boolean isLethal)
Method Detail |
---|
public java.lang.String getName()
public int getValue()
public boolean isLethal()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |