|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface that receives updates when changes occur to a game. Implementors of this interface generally desire to be notified of changes to the state of some Game or another. When the actions noted below occur, the Game calls each registered listener in turn notifying them of the event.
| Method Summary | |
void |
askRefute(Game g,
Player p,
Evidence.Suspect who,
Evidence.Room where,
Evidence.Weapon what)
The player is being asked if they can refute the evidence. |
void |
assertion(Game g,
Player p,
Evidence.Suspect who,
Evidence.Room where,
Evidence.Weapon what)
The player is attempting to win the game. |
void |
beginTurn(Game g,
Player p)
A player's turn has begun. |
void |
chat(Game g,
Player p,
java.lang.String message)
The player has sent a public chat message. |
void |
clearStartVotes(Game g)
All start votes have been set back to 'false'. |
void |
endTurn(Game g,
Player p)
A player's turn has ended. |
void |
hypothesis(Game g,
Player p,
Evidence.Suspect who,
Evidence.Room where,
Evidence.Weapon what)
The player has posed the given hypothesis. |
void |
lose(Game g,
Player p)
A player has lost the game. |
void |
move(Game g,
Evidence.Suspect s,
Location l)
A suspect has moved to a new location in the game. |
void |
newPlayer(Game g,
Player p)
A player has joined the game. |
void |
newPlayerSuspect(Game g,
Player p,
Evidence.Suspect s)
A player has selected a new Suspect to play as. |
void |
playerQuit(Game g,
Player p)
A player has quit the game. |
void |
refuted(Game g,
Player p,
Evidence.Suspect who,
Evidence.Room where,
Evidence.Weapon what)
The player has refuted the hypothesis/assertion with an unknown piece of evidence. |
void |
refuted(Game g,
Player p,
Evidence.Suspect who,
Evidence.Room where,
Evidence.Weapon what,
Evidence by)
The player has refuted the hypothesis/assertion with the piece of evidence. |
void |
spin(Game g,
Player p)
A player has spun the spinner in order to get their movement. |
void |
spin(Game g,
Player p,
int spin)
A player has spun the spinner with the given result. |
void |
unableToRefute(Game g,
Player p,
Evidence.Suspect who,
Evidence.Room where,
Evidence.Weapon what)
The player has failed to refute the hypothesis/assertion. |
void |
voteStart(Game g,
Player p,
boolean vote)
A player has changed their vote that the game should start. |
void |
win(Game g,
Player p)
A player has won the game. |
| Method Detail |
public void win(Game g,
Player p)
g - the Game that this change applies top - the Player that won the game
public void lose(Game g,
Player p)
g - the Game that this change applies top - the Player that lost the game
public void newPlayer(Game g,
Player p)
newPlayerSuspect or playerQuit.
g - the Game that this change applies top - the Player that joined the gameplayerQuit(Game, Player),
newPlayerSuspect(Game, Player, Evidence.Suspect)
public void playerQuit(Game g,
Player p)
g - the Game that this change applies top - the Player that quit the game
public void newPlayerSuspect(Game g,
Player p,
Evidence.Suspect s)
g - the Game that this change applies top - the Player who is changing or assigning their suspects - the Suspect that the Player will now be playing as
public void voteStart(Game g,
Player p,
boolean vote)
g - the Game that this change applies top - the Player who is changing/setting their votevote - the vote, true/yes/start or false/no/don't-start.clearStartVotes(Game)public void clearStartVotes(Game g)
g - the Game that this change applies to
public void beginTurn(Game g,
Player p)
g - the Game that this change applies top - the Player whose turn has just begun
public void endTurn(Game g,
Player p)
g - the Game that this change applies top - the Player whose turn has just ended
public void spin(Game g,
Player p)
g - the Game that this change applies top - the Player who is spinning the spinnerspin(Game, Player, int)
public void spin(Game g,
Player p,
int spin)
g - the Game that this change applies top - the Player who will be able to use this spin for movementspin - the number of 'spaces' the player will be able to movespin(Game, Player)
public void hypothesis(Game g,
Player p,
Evidence.Suspect who,
Evidence.Room where,
Evidence.Weapon what)
g - the Game that this change applies top - the Player who posed the hypothesiswho - the Suspect that the Player, uh, suspects did itwhere - the Place that the Player suspects it was done atwhat - the Weapon that the Player suspects was used
public void assertion(Game g,
Player p,
Evidence.Suspect who,
Evidence.Room where,
Evidence.Weapon what)
g - the Game that this change applies top - the Player who is trying to winwho - the Suspect that the Player, uh, suspects did itwhere - the Place that the Player suspects it was done atwhat - the Weapon that the Player suspects was used
public void askRefute(Game g,
Player p,
Evidence.Suspect who,
Evidence.Room where,
Evidence.Weapon what)
refuted methods.
g - the Game that this change applies top - the Player who is being asked to refutewho - the Suspect that the other Player, uh, suspects did itwhere - the Place that the other Player suspects it was done atwhat - the Weapon that the other Player suspects was usedrefuted(Game, Player, Evidence.Suspect,
Evidence.Room, Evidence.Weapon, Evidence),
refuted(Game, Player, Evidence.Suspect,
Evidence.Room, Evidence.Weapon)
public void refuted(Game g,
Player p,
Evidence.Suspect who,
Evidence.Room where,
Evidence.Weapon what,
Evidence by)
g - the Game that this change applies top - the Player who is making the refutationwho - the Suspect that the other Player, uh, suspects did itwhere - the Place that the other Player suspects it was done atwhat - the Weapon that the other Player suspects was usedby - the Evidence that p is refuting withhypothesis(Game, Player, Evidence.Suspect,
Evidence.Room, Evidence.Weapon),
assertion(Game, Player, Evidence.Suspect,
Evidence.Room, Evidence.Weapon)
public void refuted(Game g,
Player p,
Evidence.Suspect who,
Evidence.Room where,
Evidence.Weapon what)
g - the Game that this change applies top - the Player who is making the refutationwho - the Suspect that the other Player, uh, suspects did itwhere - the Place that the other Player suspects it was done atwhat - the Weapon that the other Player suspects was usedhypothesis(edu.lmu.lmusleuth.Game, edu.lmu.lmusleuth.Player, edu.lmu.lmusleuth.Evidence.Suspect, edu.lmu.lmusleuth.Evidence.Room, edu.lmu.lmusleuth.Evidence.Weapon),
assertion(edu.lmu.lmusleuth.Game, edu.lmu.lmusleuth.Player, edu.lmu.lmusleuth.Evidence.Suspect, edu.lmu.lmusleuth.Evidence.Room, edu.lmu.lmusleuth.Evidence.Weapon),
askRefute(edu.lmu.lmusleuth.Game, edu.lmu.lmusleuth.Player, edu.lmu.lmusleuth.Evidence.Suspect, edu.lmu.lmusleuth.Evidence.Room, edu.lmu.lmusleuth.Evidence.Weapon),
unableToRefute(edu.lmu.lmusleuth.Game, edu.lmu.lmusleuth.Player, edu.lmu.lmusleuth.Evidence.Suspect, edu.lmu.lmusleuth.Evidence.Room, edu.lmu.lmusleuth.Evidence.Weapon)
public void unableToRefute(Game g,
Player p,
Evidence.Suspect who,
Evidence.Room where,
Evidence.Weapon what)
g - the Game that this change applies top - the Player who is failing to make the refutationwho - the Suspect that the other Player, uh, suspects did itwhere - the Place that the other Player suspects it was done atwhat - the Weapon that the other Player suspects was usedhypothesis(edu.lmu.lmusleuth.Game, edu.lmu.lmusleuth.Player, edu.lmu.lmusleuth.Evidence.Suspect, edu.lmu.lmusleuth.Evidence.Room, edu.lmu.lmusleuth.Evidence.Weapon),
assertion(edu.lmu.lmusleuth.Game, edu.lmu.lmusleuth.Player, edu.lmu.lmusleuth.Evidence.Suspect, edu.lmu.lmusleuth.Evidence.Room, edu.lmu.lmusleuth.Evidence.Weapon)
public void move(Game g,
Evidence.Suspect s,
Location l)
g - the Game that this change applies tos - the Suspect that has been movedl - the Location that the Suspect is now at
public void chat(Game g,
Player p,
java.lang.String message)
g - the Game that this change applies top - the Player that sent the messagemessage - the text of the message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||