net.sourceforge.cilib.games.items
Class GameItem

java.lang.Object
  extended by net.sourceforge.cilib.games.items.GameItem
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
PlayerItem, TetrisBlock

public abstract class GameItem
extends Object
implements Cloneable

Any object that exists in the game.

Author:
leo
See Also:
Serialized Form

Field Summary
protected  ItemLocation itemLocation
           
 
Constructor Summary
GameItem()
           
GameItem(Enum<?> token)
           
GameItem(Enum<?> token, ItemLocation itemLocation)
           
GameItem(GameItem other)
           
 
Method Summary
abstract  GameItem getClone()
          Create a cloned copy of the current object and return it.
 ItemLocation getLocation()
           
 Enum<?> getToken()
           
 void setLoction(ItemLocation location)
           
 void setToken(Enum<?> token)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

itemLocation

protected ItemLocation itemLocation
Constructor Detail

GameItem

public GameItem()

GameItem

public GameItem(Enum<?> token)

GameItem

public GameItem(Enum<?> token,
                ItemLocation itemLocation)

GameItem

public GameItem(GameItem other)
Method Detail

setLoction

public void setLoction(ItemLocation location)

getLocation

public ItemLocation getLocation()

getClone

public abstract GameItem getClone()
Description copied from interface: Cloneable
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface Cloneable
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

getToken

public Enum<?> getToken()

setToken

public void setToken(Enum<?> token)


Copyright © 2009 CIRG. All Rights Reserved.