|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object spellcast.game.Game
public class Game
The Game class is the model for the Spellcast game. No control logic is contained in this class.
Constructor Summary | |
---|---|
Game(java.lang.String theGameName,
org.apache.commons.chain.Catalog theCommandCatalog)
Create a game. |
Method Summary | |
---|---|
void |
addWizard(IWizard w)
Add a wizard to the system. |
GameLog |
getGameLog()
Get the value of gameLog. |
java.util.List<IMonster> |
getMonsters()
The IMonster s currently in the arena. |
java.lang.String |
getName()
Return the game name. |
Turn |
getTurn()
Get the value of turn. |
IWizard |
getWizard(Id idToMatch)
Find the specified wizard by Id. |
java.util.List<IWizard> |
getWizards()
The IWizard s currently in the arena. |
boolean |
hasFinished()
Returns whether the game has finished. |
boolean |
hasStarted()
Returns whether the game has started. |
void |
processTurn()
Process the current turn. |
void |
removeWizard(IWizard w)
Remove a wizard from the system. |
void |
setGameLog(GameLog v)
Set the value of gameLog. |
void |
setTurn(Turn v)
Set the the curent turn for the game. |
void |
update(java.beans.PropertyChangeEvent pce)
Update the client's local copy of the game with the value contained in the property change event. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Game(java.lang.String theGameName, org.apache.commons.chain.Catalog theCommandCatalog)
theGameName
- the name of the game.theCommandCatalog
- contains the commands needed by the Game
.Method Detail |
---|
public final void addWizard(IWizard w)
addWizard
in interface IGame
w
- Wizard to add to the game.public final GameLog getGameLog()
getGameLog
in interface IGame
public final java.util.List<IMonster> getMonsters()
IMonster
s currently in the arena.
getMonsters
in interface IGame
IMonster
s currently in the arena.public final java.lang.String getName()
getName
in interface IGame
public final Turn getTurn()
getTurn
in interface IGame
public final IWizard getWizard(Id idToMatch)
idToMatch
- the Id
to match
Id
or null otherwise.public final java.util.List<IWizard> getWizards()
IWizard
s currently in the arena.
getWizards
in interface IGame
IWizard
s currently in the arena.public final boolean hasFinished()
hasFinished
in interface IGame
public final boolean hasStarted()
hasStarted
in interface IGame
public void processTurn()
processTurn
in interface IGame
public final void removeWizard(IWizard w)
removeWizard
in interface IGame
w
- Wizard to remove from the game.public final void setGameLog(GameLog v)
v
- Value to assign to gameLog.public final void setTurn(Turn v)
setTurn
in interface IGame
v
- the curent turn for the gamepublic final void update(java.beans.PropertyChangeEvent pce)
pce
- needs more work here.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |