net.sourceforge.cilib.games.items
Class PlayerItem

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

public class PlayerItem
extends GameItem

any game item controlled by a player

Author:
leo
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.cilib.games.items.GameItem
itemLocation
 
Constructor Summary
PlayerItem(int playerNo)
           
PlayerItem(int playerNo, Enum<?> token)
           
PlayerItem(PlayerItem Other)
           
 
Method Summary
 GameItem getClone()
          Create a cloned copy of the current object and return it.
 int getPlayerID()
           
 
Methods inherited from class net.sourceforge.cilib.games.items.GameItem
getLocation, getToken, setLoction, setToken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlayerItem

public PlayerItem(int playerNo)

PlayerItem

public PlayerItem(int playerNo,
                  Enum<?> token)

PlayerItem

public PlayerItem(PlayerItem Other)
Method Detail

getPlayerID

public int getPlayerID()

getClone

public GameItem getClone()
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
Specified by:
getClone in class GameItem
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()


Copyright © 2009 CIRG. All Rights Reserved.