|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.tabacha.cgo.AbstractEngine
Basic implementation of Engine supports initialization and internationalization.
$Id: AbstractEngine.java,v 1.2 2004/07/30 21:43:34 mk Exp $
Field Summary |
Fields inherited from interface de.tabacha.cgo.Constants |
BALL, COL_COUNT, DCOL, DOWN, DROW, E, EMPTY, FIRST_DIRECTION, KICK_OFF_FIELD, LAST_DIRECTION, N, NE, NW, OPPOSITE, PIECE, ROW_COUNT, S, SE, SW, UP, UPSIDEDOWN, W |
Constructor Summary | |
protected |
AbstractEngine()
Constructor. |
Method Summary | |
boolean |
canPlayBothSides()
This default implementation always returns false. |
java.lang.String |
getAuthor()
Returns the localized version of the author property. |
java.lang.String |
getDescription()
Returns the localized version of the description property. |
protected java.lang.String |
getI18nProperty(java.lang.String name)
Returns a localized version of the requested property. |
java.lang.String |
getName()
Returns the localized version of the name property. |
java.lang.String |
getVersion()
Returns the localized version of the version property. |
void |
initGame(long randSeed)
Initializes the random number generator. |
protected java.util.Random |
random()
Subclasses should use this object for random decisions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.tabacha.cgo.Engine |
think |
Constructor Detail |
protected AbstractEngine()
Method Detail |
protected java.lang.String getI18nProperty(java.lang.String name)
java.util.MissingResourceException
- if the property cannot be found.ResourceBundle
public java.lang.String getName()
getName
in interface Engine
java.util.MissingResourceException
- if the property cannot be found.Engine.getName()
public java.lang.String getVersion()
getVersion
in interface Engine
java.util.MissingResourceException
- if the property cannot be found.Engine.getVersion()
public java.lang.String getDescription()
getDescription
in interface Engine
java.util.MissingResourceException
- if the property cannot be found.Engine.getDescription()
public java.lang.String getAuthor()
getAuthor
in interface Engine
java.util.MissingResourceException
- if the property cannot be found.Engine.getAuthor()
public boolean canPlayBothSides()
canPlayBothSides
in interface Engine
Engine.canPlayBothSides()
public void initGame(long randSeed)
initGame
in interface Engine
randSeed
- For initializing a random number generator.
Makes it possible to repeat a game entirely; useful for testing.protected final java.util.Random random()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |