com.tootsville.game
Class ShaddowFalls

java.lang.Object
  extended by org.starhope.appius.game.GameEvent
      extended by com.tootsville.game.ShaddowFalls
All Implemented Interfaces:
Comparable<Object>, RoomListener, AcceptsMetronomeTicks, HasName

public class ShaddowFalls
extends GameEvent

Shaddow Falls is the home of the evil Shade, arch-nemesis of the Toots. Toots standing in Shaddow Falls are subject to an attrition of peanuts, except: God, Shade, Zap, and Catullus.

Author:
brpocock@star-hope.org

Field Summary
private static long serialVersionUID
          Java serialization.
private  long tPunish
          Time at which to next punish users
 
Fields inherited from class org.starhope.appius.game.GameEvent
freezeTag, gameCode, gameState, players, rooms, scores, scoreWatchRooms
 
Constructor Summary
ShaddowFalls(Zone z)
           
 
Method Summary
 void acceptGameAction(AbstractUser sender, org.json.JSONObject action)
          This is an overriding method.
 void acceptOutOfBandMessage(AbstractUser sender, Room room, org.json.JSONObject body)
          This is an overriding method.
 void acceptPublicMessage(AbstractUser sender, Room room, String message)
          This is an overriding method.
 void acceptPublicMessage(AbstractUser from, String message)
          This is an overriding method.
 void acceptUserAction(Room r, AbstractUser u)
          User actions (go/do actions) propagate through this channel.
 String getGameEventPrefix()
          This is an overriding method.
 String getName()
          This is an overriding method.
 void noOp()
          No op
 void tick(long t, long dT)
          This is an overriding method.
 
Methods inherited from class org.starhope.appius.game.GameEvent
acceptCommand, acceptCommand, acceptGameStateChange, acceptObjectJoinRoom, acceptObjectPartRoom, acceptUserVariableUpdate, changeGameState, compareTo, decrementScore, destroySelf, disconnect, equals, equals, getCountdownDuration, getEveryone, getGameCode, getGameDuration, getGameShortName, getLeaderBonus, getPlayers, getRoom, getRooms, getScoreWatchRooms, getSpectators, getTimer, getZone, hashCode, incrementScore, propagateGameStateChange, resetPlayers, sendEndEvents, sendStartEvents, toString, updateRoomVars, updateScore, updateScores
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Java serialization. serialVersionUID (long)

See Also:
Constant Field Values

tPunish

private long tPunish
Time at which to next punish users

Constructor Detail

ShaddowFalls

public ShaddowFalls(Zone z)
Parameters:
z - The zone containing this event
Method Detail

acceptGameAction

public void acceptGameAction(AbstractUser sender,
                             org.json.JSONObject action)
This is an overriding method.

Parameters:
sender - the sender
action - The game action. The verb is in action.getString("action").
See Also:
RoomListener.acceptGameAction(AbstractUser, JSONObject)

acceptOutOfBandMessage

public void acceptOutOfBandMessage(AbstractUser sender,
                                   Room room,
                                   org.json.JSONObject body)
This is an overriding method.

Parameters:
sender - The sender of the OOB message
room - The room in which the OOB message is being broadcast
body - A JSON object containing the OOB message. The contents of this message are not constrained.
See Also:
RoomListener.acceptOutOfBandMessage(AbstractUser, Room, JSONObject)

acceptPublicMessage

public void acceptPublicMessage(AbstractUser sender,
                                Room room,
                                String message)
This is an overriding method.

Specified by:
acceptPublicMessage in interface RoomListener
Overrides:
acceptPublicMessage in class GameEvent
Parameters:
sender - The speaker
room - The room in which the words were spoken
message - The spoken text or /emote
See Also:
RoomListener.acceptPublicMessage(AbstractUser, Room, String)

acceptPublicMessage

public void acceptPublicMessage(AbstractUser from,
                                String message)
This is an overriding method.

Parameters:
from - The speaker
message - The spoken text or /emote
See Also:
RoomListener.acceptPublicMessage(org.starhope.appius.user.AbstractUser, java.lang.String)

acceptUserAction

public void acceptUserAction(Room r,
                             AbstractUser u)
Description copied from interface: RoomListener
User actions (go/do actions) propagate through this channel.

Parameters:
r - the room in which the user is taking an action
u - the user taking an action
See Also:
RoomListener.acceptUserAction(org.starhope.appius.game.Room, org.starhope.appius.user.AbstractUser)

getGameEventPrefix

public String getGameEventPrefix()
This is an overriding method.

Specified by:
getGameEventPrefix in class GameEvent
Returns:
the string prefix used to find event types for this game
See Also:
GameEvent.getGameEventPrefix()

getName

public String getName()
This is an overriding method.

Returns:
a user-visible string name for this instance
See Also:
HasName.getName()

noOp

public void noOp()
No op


tick

public void tick(long t,
                 long dT)
          throws UserDeadException
This is an overriding method.

Specified by:
tick in interface AcceptsMetronomeTicks
Overrides:
tick in class GameEvent
Parameters:
t - Time since epoch at the start of the global metronome propagation, as per System.currentTimeMillis()
dT - Delta-time in milliseconds since the prior global metronome tick
Throws:
UserDeadException - if a user has died during this tick
See Also:
GameEvent.tick(long, long)