net.sourceforge.cilib.games.items
Class GridItem

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

public class GridItem
extends PlayerItem

An object in the game that is located in a grid.

Author:
leo
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.cilib.games.items.GameItem
itemLocation
 
Constructor Summary
GridItem(GridItem Other)
          Copy constructor
GridItem(int playerNo, Enum<?> token, int gridWidth, int gridHeight)
           
GridItem(int playerNo, Enum<?> token, int xMax, int yMax, int zMax)
           
GridItem(int playerNo, Enum<?> token, ItemLocation location)
           
 
Method Summary
 GridItem getClone()
          Create a cloned copy of the current object and return it.
 
Methods inherited from class net.sourceforge.cilib.games.items.PlayerItem
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

GridItem

public GridItem(int playerNo,
                Enum<?> token,
                int gridWidth,
                int gridHeight)
Parameters:
playerNo -

GridItem

public GridItem(int playerNo,
                Enum<?> token,
                ItemLocation location)

GridItem

public GridItem(int playerNo,
                Enum<?> token,
                int xMax,
                int yMax,
                int zMax)

GridItem

public GridItem(GridItem Other)
Copy constructor

Parameters:
Other -
Method Detail

getClone

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


Copyright © 2009 CIRG. All Rights Reserved.