net.sf.mud4j.world
Class Room

java.lang.Object
  extended by net.sf.mud4j.world.Room
All Implemented Interfaces:
Effectable, Location, TileLocation

public class Room
extends java.lang.Object
implements TileLocation

Defines rooms interface as a location that events happen within. TODO implement events for when a Placeable becomes moved TODO keep internal list of Placeables within room

Author:
Matthew Purland

Constructor Summary
Room()
           
 
Method Summary
 void addDirection(Direction direction)
          Add a direction to the location.
 java.util.List<Direction> getDirections()
          Get list of directions for the location.
 EffectBehavior getEffectBehavior()
          Get effect behavior to handle effects.
 java.lang.String getName()
          Get the name of the location.
 void move(Placeable placeable)
          Move a Placeable object to this location.
 void removeDirection(Direction direction)
          Remove a direction from the location.
 void setEffectBehavior(EffectBehavior effectBehavior)
          Set effect behavior on the effectable object.
 void setName(java.lang.String name)
          Set the name of the location;
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Room

public Room()
Method Detail

getName

public java.lang.String getName()
Get the name of the location.


setName

public void setName(java.lang.String name)
Set the name of the location;


addDirection

public void addDirection(Direction direction)
Add a direction to the location.

Specified by:
addDirection in interface TileLocation
Parameters:
direction - Direction to add to the location.

removeDirection

public void removeDirection(Direction direction)
Remove a direction from the location.

Specified by:
removeDirection in interface TileLocation
Parameters:
direction - to remove from the location.

getDirections

public java.util.List<Direction> getDirections()
Get list of directions for the location.

Specified by:
getDirections in interface TileLocation
Returns:
Returns the list implementation for the location.

move

public void move(Placeable placeable)
Move a Placeable object to this location.

Specified by:
move in interface Location
Parameters:
placeable - Placeable object to move to this location.

getEffectBehavior

public EffectBehavior getEffectBehavior()
Get effect behavior to handle effects.

Specified by:
getEffectBehavior in interface Effectable
Returns:
Returns the effect behavior.

setEffectBehavior

public void setEffectBehavior(EffectBehavior effectBehavior)
Set effect behavior on the effectable object.

Specified by:
setEffectBehavior in interface Effectable


Copyright © 2006-2007 mud4j. All Rights Reserved.