Thread: [mud4j-commit] SF.net SVN: mud4j: [39] trunk/mud4j-core/src/java/net/sf/mud4j/world/Room. java
Status: Pre-Alpha
Brought to you by:
mpurland
From: <mpu...@us...> - 2006-12-23 17:14:02
|
Revision: 39 http://mud4j.svn.sourceforge.net/mud4j/?rev=39&view=rev Author: mpurland Date: 2006-12-23 09:13:59 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Fix build to add effect behavior getter/setter to Room. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/world/Room.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/world/Room.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/world/Room.java 2006-12-23 17:11:23 UTC (rev 38) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/Room.java 2006-12-23 17:13:59 UTC (rev 39) @@ -19,7 +19,9 @@ import java.util.ArrayList; import java.util.List; +import net.sf.mud4j.effect.EffectBehavior; + /** * Defines rooms interface as a location that events happen within. * @@ -32,6 +34,7 @@ // List of directions private List<Direction> directionList = new ArrayList<Direction>(); + private EffectBehavior effectBehavior; public Room() { } @@ -64,4 +67,18 @@ placeable.place(this); } + + /** + * {@inheritDoc} + */ + public EffectBehavior getEffectBehavior() { + return effectBehavior; + } + + /** + * {@inheritDoc} + */ + public void setEffectBehavior(EffectBehavior effectBehavior) { + this.effectBehavior = effectBehavior; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 23:11:07
|
Revision: 64 http://mud4j.svn.sourceforge.net/mud4j/?rev=64&view=rev Author: mpurland Date: 2006-12-24 15:11:05 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Update room for tile location. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/world/Room.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/world/Room.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/world/Room.java 2006-12-24 23:10:40 UTC (rev 63) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/Room.java 2006-12-24 23:11:05 UTC (rev 64) @@ -30,33 +30,46 @@ * * @author Matthew Purland */ -public class Room implements Location { +public class Room implements TileLocation { // List of directions private List<Direction> directionList = new ArrayList<Direction>(); private EffectBehavior effectBehavior; + private String roomName; public Room() { } /** - * Add a direction to the location. - * @param direction Direction to add to the room. + * Get the name of the location. */ + public String getName() { + return roomName; + } + + /** + * Set the name of the location; + */ + public void setName(String name) { + this.roomName = name; + } + + /** + * {@inheritDoc} + */ public void addDirection(Direction direction) { directionList.add(direction); } /** - * Remove a direction from the location. + * {@inheritDoc} */ public void removeDirection(Direction direction) { directionList.remove(direction); } /** - * Get list of directions for the location. - * @return Returns the list implementation for the location. + * {@inheritDoc} */ public List<Direction> getDirections() { return directionList; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2007-06-03 01:25:15
|
Revision: 127 http://mud4j.svn.sourceforge.net/mud4j/?rev=127&view=rev Author: mpurland Date: 2007-06-02 18:25:14 -0700 (Sat, 02 Jun 2007) Log Message: ----------- Fix javadoc. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/world/Room.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/world/Room.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/world/Room.java 2007-06-03 01:24:36 UTC (rev 126) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/Room.java 2007-06-03 01:25:14 UTC (rev 127) @@ -21,13 +21,11 @@ import net.sf.mud4j.effect.EffectBehavior; - /** - * Defines rooms interface as a location that events happen within. + * 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 * - * TODO implement events for when a Placeable becomes moved - * TODO keep internal list of Placeables within room - * * @author Matthew Purland */ public class Room implements TileLocation { @@ -36,24 +34,31 @@ private List<Direction> directionList = new ArrayList<Direction>(); private EffectBehavior effectBehavior; private String roomName; - + + /** + * Constructor to create a default room. + */ public Room() { } - + /** * Get the name of the location. + * + * @return Returns the name of the room. */ - public String getName() { + public String getRoomName() { return roomName; } - + /** - * Set the name of the location; + * Set the name of the room. + * + * @param roomName Text of the room name */ - public void setName(String name) { - this.roomName = name; + public void setRoomName(String roomName) { + this.roomName = roomName; } - + /** * {@inheritDoc} */ @@ -66,8 +71,8 @@ */ public void removeDirection(Direction direction) { directionList.remove(direction); - } - + } + /** * {@inheritDoc} */ @@ -79,7 +84,6 @@ * {@inheritDoc} */ public void move(Placeable placeable) { - placeable.place(this); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |