net.sourceforge.cilib.games.game.tetris
Class TetrisBlock

java.lang.Object
  extended by net.sourceforge.cilib.games.items.GameItem
      extended by net.sourceforge.cilib.games.game.tetris.TetrisBlock
All Implemented Interfaces:
Serializable, Cloneable

public class TetrisBlock
extends GameItem

Author:
leo This class represents a Block in tetris
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.cilib.games.items.GameItem
itemLocation
 
Constructor Summary
TetrisBlock(Enum<? extends GameEnum> token, ItemLocation itemLocation)
           
TetrisBlock(TetrisBlock other)
           
 
Method Summary
 void addMoveDown()
           
 TetrisBlock getClone()
          Create a cloned copy of the current object and return it.
 int getInt(int dimension)
           
 void setInt(int dimention, int value)
           
 boolean update(double currentSpeed, GridGameState state)
           
 void updateMovesDown()
           
 
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

TetrisBlock

public TetrisBlock(Enum<? extends GameEnum> token,
                   ItemLocation itemLocation)

TetrisBlock

public TetrisBlock(TetrisBlock other)
Method Detail

getClone

public TetrisBlock 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()

update

public boolean update(double currentSpeed,
                      GridGameState state)

addMoveDown

public void addMoveDown()

updateMovesDown

public void updateMovesDown()

getInt

public int getInt(int dimension)

setInt

public void setInt(int dimention,
                   int value)


Copyright © 2009 CIRG. All Rights Reserved.