|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
All lmusleuth game objects should support these methods. This
interface enables lmusleuth implementations and subsystems to
make use of the GameChangeListener
interface.
Method Summary | |
void |
addGameChangeListener(GameChangeListener gcl)
Add a game change listener to the game. |
void |
addPlayer(Player p)
Add a player to the Game. |
void |
chat(Player p,
java.lang.String message)
The player wants to send this message to everyone in this game. |
Player |
getCurrentPlayer()
Get the player whose turn it is in this game. |
java.lang.String |
getName()
Get the name of this game. |
java.util.List |
getPlayers()
Get the list of players that are currently in this game. |
boolean |
isOver()
Returns whether or not this game is over. |
boolean |
isStarted()
Returns whether or not the game has started. |
void |
makeAssertion(Player p,
Evidence.Suspect who,
Evidence.Room where,
Evidence.Weapon what)
The given player is making an assertion about these pieces of evidence. |
void |
makeHypothesis(Player p,
Evidence.Suspect who,
Evidence.Room where,
Evidence.Weapon what)
The given player is making an hypothesis about these pieces of evidence. |
void |
move(Player p,
Location l)
The player wants to move (their suspect) to the given location. |
void |
refute(Player p,
Evidence evidence)
Refute the hypothesis with the given evidence. |
void |
removeGameChangeListener(GameChangeListener gcl)
Removes a game change listener to the game. |
void |
removePlayer(Player p)
Remove the given player from this Game. |
void |
spin(Player p)
The player wants to spin the spinner. |
Methods inherited from interface edu.lmu.lmusleuth.GameChangeListener |
askRefute, assertion, beginTurn, chat, clearStartVotes, endTurn, hypothesis, lose, move, newPlayer, newPlayerSuspect, playerQuit, refuted, refuted, spin, spin, unableToRefute, voteStart, win |
Method Detail |
public void addPlayer(Player p)
public void removePlayer(Player p)
public java.util.List getPlayers()
public void addGameChangeListener(GameChangeListener gcl)
GameChangeListener
will be added to the Game
's
list of interested listeners and will begin to receive updates on
the activity in this game.
WARNING: Even though Game
implements
GameChangeListener
it is not recommended that
you add the game to itself.
public void removeGameChangeListener(GameChangeListener gcl)
public Player getCurrentPlayer() throws java.lang.IllegalStateException
java.lang.IllegalStateException
public void makeHypothesis(Player p, Evidence.Suspect who, Evidence.Room where, Evidence.Weapon what) throws java.lang.IllegalStateException
java.lang.IllegalStateException
public void makeAssertion(Player p, Evidence.Suspect who, Evidence.Room where, Evidence.Weapon what) throws java.lang.IllegalStateException
java.lang.IllegalStateException
public void refute(Player p, Evidence evidence) throws java.lang.IllegalStateException
java.lang.IllegalStateException
public void spin(Player p)
public void move(Player p, Location l)
public void chat(Player p, java.lang.String message)
public java.lang.String getName()
public boolean isStarted()
public boolean isOver()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |