|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectspellcast.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 IMonsters 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 IWizards 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 IGamew - Wizard to add to the game.public final GameLog getGameLog()
getGameLog in interface IGamepublic final java.util.List<IMonster> getMonsters()
IMonsters currently in the arena.
getMonsters in interface IGameIMonsters currently in the arena.public final java.lang.String getName()
getName in interface IGamepublic final Turn getTurn()
getTurn in interface IGamepublic final IWizard getWizard(Id idToMatch)
idToMatch - the Id to match
Id or null otherwise.public final java.util.List<IWizard> getWizards()
IWizards currently in the arena.
getWizards in interface IGameIWizards currently in the arena.public final boolean hasFinished()
hasFinished in interface IGamepublic final boolean hasStarted()
hasStarted in interface IGamepublic void processTurn()
processTurn in interface IGamepublic final void removeWizard(IWizard w)
removeWizard in interface IGamew - 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 IGamev - 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 | |||||||||