knockabout.gamemodel
Class Hex

java.lang.Object
  extended byknockabout.gamemodel.Hex

public class Hex
extends java.lang.Object

KnockAbout Hexagon Object Represents 1 tile on the Knockabout Game Board This tile may or may not contain a die. A die-less tile is represented when the die variable is set to null. Otherwise, that variable will point to the die currently resting on the tile


Method Summary
 Hex deepclone()
          Return a fresh copy of this hex, including the deep clone of the enclosing die if any
 Die getDie()
           
 boolean isOccupied()
           
 void putDie(Die _die)
          Places a die on top of this tile.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isOccupied

public boolean isOccupied()

putDie

public void putDie(Die _die)
Places a die on top of this tile. Caution: In it's current form, this function will overwrite any die tbat was previously on this tile.


getDie

public Die getDie()

deepclone

public Hex deepclone()
Return a fresh copy of this hex, including the deep clone of the enclosing die if any

Returns:
The cloned hex