mud4j-commit Mailing List for mud4j (Page 5)
Status: Pre-Alpha
Brought to you by:
mpurland
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(57) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(31) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(20) |
Jul
|
Aug
|
Sep
(1) |
Oct
(14) |
Nov
(2) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <mpu...@us...> - 2006-12-24 23:09:59
|
Revision: 61 http://mud4j.svn.sourceforge.net/mud4j/?rev=61&view=rev Author: mpurland Date: 2006-12-24 15:09:58 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Update todo doc. Modified Paths: -------------- trunk/mud4j-core/doc/todo.txt Modified: trunk/mud4j-core/doc/todo.txt =================================================================== --- trunk/mud4j-core/doc/todo.txt 2006-12-24 23:08:51 UTC (rev 60) +++ trunk/mud4j-core/doc/todo.txt 2006-12-24 23:09:58 UTC (rev 61) @@ -17,6 +17,16 @@ * Create Swing application for world building and administration. OR what about a web application that accesses game directly or through SOAP? +* Groovy scripting + +* Support of multiple databases through Spring/hibernate. + +* Usage of HSQLDB for embeddable database support. Will allow ability to + switch to MySQL/Postgres and other drivers supported by hibernate and spring. + +* For mud4j-web, embed Jetty container and build WAR for inclusion in external + containers. + Game ---- * Allow characters and objects to be interchangeable in certain instances. @@ -31,4 +41,13 @@ * Implement tile-based system for worlds/locations (aka rooms) * Implement floating-based system for movement instead. This would allow adoption of framework in different types of game systems - such as 3D or 2D isometric games. \ No newline at end of file + such as 3D or 2D isometric games. + +* Command pattern for mud4j commands issued to the core server + +* For views of core, implement using a two-stage view either using a + template view, or a transform view for web and telnet + +* Time (implementation of ticks with observer pattern) to allow runtime + configuration of listeners for when a tick happens all listeners should + be notified. \ No newline at end of file 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:08:52
|
Revision: 60 http://mud4j.svn.sourceforge.net/mud4j/?rev=60&view=rev Author: mpurland Date: 2006-12-24 15:08:51 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Delete mud4j-editor project. Removed Paths: ------------- trunk/mud4j-editor/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 19:50:33
|
Revision: 59 http://mud4j.svn.sourceforge.net/mud4j/?rev=59&view=rev Author: mpurland Date: 2006-12-24 11:50:28 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Update test packages. Added Paths: ----------- trunk/mud4j-core/src/test/db/net/sf/ trunk/mud4j-core/src/test/db/net/sf/mud4j/ trunk/mud4j-core/src/test/db/net/sf/mud4j/dao/ trunk/mud4j-core/src/test/db/net/sf/mud4j/dao/hibernate/ Removed Paths: ------------- trunk/mud4j-core/src/test/db/net/mud4j/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 19:46:04
|
Revision: 58 http://mud4j.svn.sourceforge.net/mud4j/?rev=58&view=rev Author: mpurland Date: 2006-12-24 11:46:01 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Update maven project dependencies. Modified Paths: -------------- trunk/mud4j-core/project.xml Modified: trunk/mud4j-core/project.xml =================================================================== --- trunk/mud4j-core/project.xml 2006-12-24 19:44:15 UTC (rev 57) +++ trunk/mud4j-core/project.xml 2006-12-24 19:46:01 UTC (rev 58) @@ -38,17 +38,6 @@ <artifactId>hibernate</artifactId> <version>3.2.0.cr5</version> </dependency> - - <dependency> - <groupId>postgresql</groupId> - <artifactId>postgresql</artifactId> - <version>8.1-404.jdbc3</version> - </dependency> - <dependency> - <groupId>ehcache</groupId> - <artifactId>ehcache</artifactId> - <version>1.2beta4</version> - </dependency> <!-- AspectJ --> <dependency> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 19:44:16
|
Revision: 57 http://mud4j.svn.sourceforge.net/mud4j/?rev=57&view=rev Author: mpurland Date: 2006-12-24 11:44:15 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Move persistence dir to src/resources Added Paths: ----------- trunk/mud4j-core/src/resources/ trunk/mud4j-core/src/resources/persistence/ trunk/mud4j-core/src/resources/persistence/hibernate.cfg.xml trunk/mud4j-core/src/resources/persistence/mapping/ Removed Paths: ------------- trunk/mud4j-core/persistence/hibernate.cfg.xml trunk/mud4j-core/persistence/mapping/ Deleted: trunk/mud4j-core/persistence/hibernate.cfg.xml =================================================================== --- trunk/mud4j-core/persistence/hibernate.cfg.xml 2006-12-24 18:36:06 UTC (rev 56) +++ trunk/mud4j-core/persistence/hibernate.cfg.xml 2006-12-24 19:44:15 UTC (rev 57) @@ -1,38 +0,0 @@ -<?xml version='1.0' encoding='utf-8'?> -<!DOCTYPE hibernate-configuration PUBLIC - "-//Hibernate/Hibernate Configuration DTD 3.0//EN" - "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> - -<hibernate-configuration> - - <session-factory> - - <!-- Database connection settings --> - <property name="connection.driver_class">org.hsqldb.jdbcDriver</property> - <property name="connection.url">jdbc:hsqldb:hsql://localhost</property> - <property name="connection.username">sa</property> - <property name="connection.password"></property> - - <!-- JDBC connection pool (use the built-in) --> - <property name="connection.pool_size">1</property> - - <!-- SQL dialect --> - <property name="dialect">org.hibernate.dialect.HSQLDialect</property> - - <!-- Enable Hibernate's automatic session context management --> - <property name="current_session_context_class">thread</property> - - <!-- Disable the second-level cache --> - <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property> - - <!-- Echo all executed SQL to stdout --> - <property name="show_sql">true</property> - - <!-- Drop and re-create the database schema on startup --> - <property name="hbm2ddl.auto">create</property> - - <mapping resource="persistence/mapping/*.hbm.xml"/> - - </session-factory> - -</hibernate-configuration> \ No newline at end of file Copied: trunk/mud4j-core/src/resources/persistence/hibernate.cfg.xml (from rev 46, trunk/mud4j-core/persistence/hibernate.cfg.xml) =================================================================== --- trunk/mud4j-core/src/resources/persistence/hibernate.cfg.xml (rev 0) +++ trunk/mud4j-core/src/resources/persistence/hibernate.cfg.xml 2006-12-24 19:44:15 UTC (rev 57) @@ -0,0 +1,38 @@ +<?xml version='1.0' encoding='utf-8'?> +<!DOCTYPE hibernate-configuration PUBLIC + "-//Hibernate/Hibernate Configuration DTD 3.0//EN" + "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> + +<hibernate-configuration> + + <session-factory> + + <!-- Database connection settings --> + <property name="connection.driver_class">org.hsqldb.jdbcDriver</property> + <property name="connection.url">jdbc:hsqldb:hsql://localhost</property> + <property name="connection.username">sa</property> + <property name="connection.password"></property> + + <!-- JDBC connection pool (use the built-in) --> + <property name="connection.pool_size">1</property> + + <!-- SQL dialect --> + <property name="dialect">org.hibernate.dialect.HSQLDialect</property> + + <!-- Enable Hibernate's automatic session context management --> + <property name="current_session_context_class">thread</property> + + <!-- Disable the second-level cache --> + <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property> + + <!-- Echo all executed SQL to stdout --> + <property name="show_sql">true</property> + + <!-- Drop and re-create the database schema on startup --> + <property name="hbm2ddl.auto">create</property> + + <mapping resource="persistence/mapping/*.hbm.xml"/> + + </session-factory> + +</hibernate-configuration> \ No newline at end of file Copied: trunk/mud4j-core/src/resources/persistence/mapping (from rev 46, trunk/mud4j-core/persistence/mapping) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 18:36:08
|
Revision: 56 http://mud4j.svn.sourceforge.net/mud4j/?rev=56&view=rev Author: mpurland Date: 2006-12-24 10:36:06 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Add container item type. Added Paths: ----------- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ContainerItemType.java Added: trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ContainerItemType.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ContainerItemType.java (rev 0) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ContainerItemType.java 2006-12-24 18:36:06 UTC (rev 56) @@ -0,0 +1,99 @@ +/** + * Copyright 2006 Matthew Purland (m.p...@gm...) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.mud4j.world.item; + +import java.util.ArrayList; +import java.util.List; + +/** + * Container item type for managing a collection of items within + * it. + * + * @author Matthew Purland + */ +public class ContainerItemType extends AbstractItemType { + + // Capacity for the item container + private int initialCapacity; + private List<Item> itemList; + + /** + * Create an container item type with an initial capacity. + * + * @param initialCapacity Initial capacity of the item list. + */ + public ContainerItemType(int initialCapacity) { + this.initialCapacity = initialCapacity; + itemList = new ArrayList<Item>(initialCapacity); + } + + /** + * Add an item to the container. + * + * @param item Item to add to the container. + */ + public void addItem(Item item) { + itemList.add(item); + } + + /** + * Remove an item from the container. + * + * @param item Item to remove from the container. + */ + public void removeItem(Item item) { + itemList.remove(item); + } + + private int getInitialCapacity() { + return initialCapacity; + } + + private int getSize() { + return itemList.size(); + } + + /** + * {@inheritDoc} + */ + @Override + public int compareTo(Object o) { + if (o instanceof ContainerItemType) { + ContainerItemType itemType = (ContainerItemType) o; + + // First compare by initial capacity + if (getInitialCapacity() > itemType.getInitialCapacity()) { + return 1; + } + else if (getInitialCapacity() < itemType.getInitialCapacity()) { + return -1; + } + // If they are of equal initial capacity, then compare by + // their current sizes + else { + if (getSize() > itemType.getSize()) { + return 1; + } + else if (getSize() < itemType.getSize()) { + return -1; + } + } + } + + return 0; + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 18:06:15
|
Revision: 55 http://mud4j.svn.sourceforge.net/mud4j/?rev=55&view=rev Author: mpurland Date: 2006-12-24 10:06:13 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Add abstract implementation of Item interface. Added Paths: ----------- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/AbstractItem.java Added: trunk/mud4j-core/src/java/net/sf/mud4j/world/item/AbstractItem.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/AbstractItem.java (rev 0) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/item/AbstractItem.java 2006-12-24 18:06:13 UTC (rev 55) @@ -0,0 +1,73 @@ +/** + * Copyright 2006 Matthew Purland (m.p...@gm...) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.mud4j.world.item; + +import java.util.ArrayList; +import java.util.List; + +import net.sf.mud4j.effect.EffectBehavior; + +/** + * Abstract implementation for an item type. + * + * @author Matthew Purland + */ +public class AbstractItem implements Item { + + private String itemName; + + // List of item types + private List<ItemType> itemTypes = new ArrayList<ItemType>(); + + // Effect behavior for item effects + private EffectBehavior effectBehavior; + + /** + * {@inheritDoc} + */ + public String getName() { + return itemName; + } + + /** + * {@inheritDoc} + */ + public void setName(String newItemName) { + this.itemName = newItemName; + } + + /** + * {@inheritDoc} + */ + public List<ItemType> getTypes() { + return itemTypes; + } + + /** + * {@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 18:04:01
|
Revision: 54 http://mud4j.svn.sourceforge.net/mud4j/?rev=54&view=rev Author: mpurland Date: 2006-12-24 10:03:59 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Update Item interface with new methods. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/Item.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/world/item/Item.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/Item.java 2006-12-24 17:58:09 UTC (rev 53) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/item/Item.java 2006-12-24 18:03:59 UTC (rev 54) @@ -16,28 +16,35 @@ package net.sf.mud4j.world.item; +import java.util.List; + import net.sf.mud4j.effect.Effectable; /** - * Game item interface. + * Item interface for allowing different items to be created for a single API. * * @author Matthew Purland - * */ public interface Item extends Effectable { /** - * Get item type of this item. + * Get list of item types for the item. An item should be able to have + * multiple item types. * - * TODO shouldn't an item be able to have many item types? - * - * @return Returns item type for the given item. + * @return Returns list of item types for the given item. */ - public ItemType getType(); - + public List<ItemType> getTypes(); + /** * Get the name of the item. * * @return Returns the name of the item. */ public String getName(); + + /** + * Set the name of the item. + * + * @param newItemName New item name for the item. + */ + public void setName(String newItemName); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 17:58:10
|
Revision: 53 http://mud4j.svn.sourceforge.net/mud4j/?rev=53&view=rev Author: mpurland Date: 2006-12-24 09:58:09 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Add comment for abstract class. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/AbstractItemType.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/world/item/AbstractItemType.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/AbstractItemType.java 2006-12-24 17:56:43 UTC (rev 52) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/item/AbstractItemType.java 2006-12-24 17:58:09 UTC (rev 53) @@ -17,8 +17,11 @@ package net.sf.mud4j.world.item; /** + * Abstract implementation for item types. Most item types that + * want default implementation will want to extend from this abstract + * implementation. + * * @author Matthew Purland - * */ public abstract class AbstractItemType implements ItemType { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 17:56:46
|
Revision: 52 http://mud4j.svn.sourceforge.net/mud4j/?rev=52&view=rev Author: mpurland Date: 2006-12-24 09:56:43 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Add setName for item type. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ItemType.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ItemType.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ItemType.java 2006-12-24 17:54:16 UTC (rev 51) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ItemType.java 2006-12-24 17:56:43 UTC (rev 52) @@ -28,4 +28,11 @@ * @return Returns the name of the item type. */ public String getName(); + + /** + * Set the name of the type of the item. + * + * @param newItemName New item name for the item type. + */ + public void setName(String newItemName); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 17:54:22
|
Revision: 51 http://mud4j.svn.sourceforge.net/mud4j/?rev=51&view=rev Author: mpurland Date: 2006-12-24 09:54:16 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Update item types (comments, and inheritance) Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ArmorItemType.java trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ItemType.java trunk/mud4j-core/src/java/net/sf/mud4j/world/item/WeaponItemType.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ArmorItemType.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ArmorItemType.java 2006-12-24 17:45:00 UTC (rev 50) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ArmorItemType.java 2006-12-24 17:54:16 UTC (rev 51) @@ -17,27 +17,24 @@ package net.sf.mud4j.world.item; /** - * Armor item type. + * Armor item type for items that are of type armor. * * @author Matthew Purland - * */ -public class ArmorItemType implements ItemType { +public class ArmorItemType extends AbstractItemType { private int armorRating = 0; + /** + * Creates an armor item type with a given armor rating. + * + * @param armorRating Armor rating for how strong the item is. + */ public ArmorItemType(int armorRating) { this.armorRating = armorRating; } /** - * {@inheritDoc} - */ - public String getName() { - return "armor"; - } - - /** * Get armor class rating of armor item type. * * @return Returns armor class rating of item type. Modified: trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ItemType.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ItemType.java 2006-12-24 17:45:00 UTC (rev 50) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ItemType.java 2006-12-24 17:54:16 UTC (rev 51) @@ -20,7 +20,6 @@ * Item type interface to help define the outer skeleton of item types. * * @author Matthew Purland - * */ public interface ItemType extends Comparable { /** Modified: trunk/mud4j-core/src/java/net/sf/mud4j/world/item/WeaponItemType.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/WeaponItemType.java 2006-12-24 17:45:00 UTC (rev 50) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/item/WeaponItemType.java 2006-12-24 17:54:16 UTC (rev 51) @@ -21,13 +21,18 @@ * type. * * @author Matthew Purland - * */ public class WeaponItemType extends AbstractItemType implements ItemType { private int minRating = 0; private int maxRating = 0; + /** + * Creates a weapon with a minimum rating and a maximum rating. + * + * @param minRating Minimum rating for the weapon. + * @param maxRating Maximum rating for the weapon. + */ public WeaponItemType(int minRating, int maxRating) { this.minRating = minRating; this.maxRating = maxRating; @@ -43,6 +48,8 @@ /** * Get minimum rating of weapon. + * + * @return Returns the minimum rating of the weapon. */ public int getWeaponMinRating() { return minRating; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 17:45:03
|
Revision: 50 http://mud4j.svn.sourceforge.net/mud4j/?rev=50&view=rev Author: mpurland Date: 2006-12-24 09:45:00 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Update javadoc comments. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/effect/EffectBehavior.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/effect/EffectBehavior.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/effect/EffectBehavior.java 2006-12-24 17:40:18 UTC (rev 49) +++ trunk/mud4j-core/src/java/net/sf/mud4j/effect/EffectBehavior.java 2006-12-24 17:45:00 UTC (rev 50) @@ -30,16 +30,24 @@ /** * Get list of effects. + * + * @return Returns a list of effects. */ public List<Effect> getEffects(); /** * Add effect to behavior object. + * + * @param effect Effect to add. + * @throws EffectException in case adding an effect will not be possible. */ public void addEffect(Effect effect) throws EffectException; /** * Remove effect from behavior object. + * + * @param effect Effect to remove. + * @throws EffectException in case removing an effect will not be possible. */ public void removeEffect(Effect effect) throws EffectException; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 17:40:20
|
Revision: 49 http://mud4j.svn.sourceforge.net/mud4j/?rev=49&view=rev Author: mpurland Date: 2006-12-24 09:40:18 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Add javadoc comments for public methods. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/ability/AbilityException.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/ability/AbilityException.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/ability/AbilityException.java 2006-12-24 17:35:53 UTC (rev 48) +++ trunk/mud4j-core/src/java/net/sf/mud4j/ability/AbilityException.java 2006-12-24 17:40:18 UTC (rev 49) @@ -27,11 +27,24 @@ // Ability that the exceptio occurred upon. private Ability ability; + /** + * Create an ability exception that can be tracked + * to a particular ability. + * + * @param ability Ability that throwed the exception. + */ public AbilityException(Ability ability) { super(); this.ability = ability; } + /** + * Creates an ability exception that can be tracked + * to a particular ability with a message. + * + * @param message Exception message for the exception. + * @param ability Ability that throwed the exception. + */ public AbilityException(String message, Ability ability) { super(message); this.ability = ability; @@ -39,6 +52,7 @@ /** * Return the ability. + * @return Returns an ability for the exception. */ public Ability getAbility() { return ability; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 17:35:55
|
Revision: 48 http://mud4j.svn.sourceforge.net/mud4j/?rev=48&view=rev Author: mpurland Date: 2006-12-24 09:35:53 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Add tile locations. This will allow tile locations to provide directions from which the next tile can connect through directions. Added Paths: ----------- trunk/mud4j-core/src/java/net/sf/mud4j/world/TileLocation.java Added: trunk/mud4j-core/src/java/net/sf/mud4j/world/TileLocation.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/world/TileLocation.java (rev 0) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/TileLocation.java 2006-12-24 17:35:53 UTC (rev 48) @@ -0,0 +1,44 @@ +/** + * Copyright 2006 Matthew Purland (m.p...@gm...) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.mud4j.world; + +import java.util.List; + +/** + * Location that represents a single tile that contains + * directions that link to other locations. + * + * @author Matthew Purland + */ +public interface TileLocation extends Location { + /** + * Add a direction to the location. + * @param direction Direction to add to the location. + */ + public void addDirection(Direction direction); + + /** + * Remove a direction from the location. + * @param direction to remove from the location. + */ + public void removeDirection(Direction direction); + + /** + * Get list of directions for the location. + * @return Returns the list implementation for the location. + */ + public List<Direction> getDirections(); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 17:33:31
|
Revision: 47 http://mud4j.svn.sourceforge.net/mud4j/?rev=47&view=rev Author: mpurland Date: 2006-12-24 09:33:29 -0800 (Sun, 24 Dec 2006) Log Message: ----------- Provide javadoc for constructor. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/world/Direction.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/world/Direction.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/world/Direction.java 2006-12-24 01:36:22 UTC (rev 46) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/Direction.java 2006-12-24 17:33:29 UTC (rev 47) @@ -26,6 +26,10 @@ private String directionName; + /** + * Creates a direction with a name such as "north" or "south". + * @param directionName Name of the direction. + */ public Direction(String directionName) { this.directionName = directionName; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 01:36:23
|
Revision: 46 http://mud4j.svn.sourceforge.net/mud4j/?rev=46&view=rev Author: mpurland Date: 2006-12-23 17:36:22 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Refactor directions to room instead of a location. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/world/Location.java trunk/mud4j-core/src/java/net/sf/mud4j/world/Room.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/world/Location.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/world/Location.java 2006-12-24 01:32:49 UTC (rev 45) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/Location.java 2006-12-24 01:36:22 UTC (rev 46) @@ -33,25 +33,8 @@ * @author Matthew Purland */ public interface Location extends Effectable { - + /** - * Add a direction to the location. - * @param direction Direction to add to the room. - */ - public void addDirection(Direction direction); - - /** - * Remove a direction from the location. - */ - public void removeDirection(Direction direction); - - /** - * Get list of directions for the location. - * @return Returns the list implementation for the location. - */ - public List<Direction> getDirections(); - - /** * Move a {@link Placeable} object to this location. * @param placeable Placeable object to move to this location. */ 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 01:32:49 UTC (rev 45) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/Room.java 2006-12-24 01:36:22 UTC (rev 46) @@ -40,21 +40,23 @@ } /** - * {@inheritDoc} + * Add a direction to the location. + * @param direction Direction to add to the room. */ public void addDirection(Direction direction) { directionList.add(direction); } /** - * {@inheritDoc} + * Remove a direction from the location. */ public void removeDirection(Direction direction) { directionList.remove(direction); } /** - * {@inheritDoc} + * Get list of directions for the location. + * @return Returns the list implementation for the location. */ 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...> - 2006-12-24 01:32:50
|
Revision: 45 http://mud4j.svn.sourceforge.net/mud4j/?rev=45&view=rev Author: mpurland Date: 2006-12-23 17:32:49 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Use abstract damage behavior inherited methods. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/damage/PointDamageBehavior.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/damage/PointDamageBehavior.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/damage/PointDamageBehavior.java 2006-12-24 01:29:41 UTC (rev 44) +++ trunk/mud4j-core/src/java/net/sf/mud4j/damage/PointDamageBehavior.java 2006-12-24 01:32:49 UTC (rev 45) @@ -25,11 +25,8 @@ * * @author Matthew Purland */ -public class PointDamageBehavior implements DamageBehavior { +public class PointDamageBehavior extends AbstractDamageBehavior implements DamageBehavior { - // List of damage listeners - private List<DamageListener> damageListenersList; - /** * Inflict the specified number of damage points to the object. * @@ -39,8 +36,6 @@ } - - /** * {@inheritDoc} */ @@ -48,34 +43,4 @@ // TODO Auto-generated method stub } - - /** - * {@inheritDoc} - */ - public void destroy() { - // TODO Auto-generated method stub - - } - - /** - * {@inheritDoc} - */ - public boolean isDestroyed() { - // TODO Auto-generated method stub - return false; - } - - /** - * {@inheritDoc} - */ - public void addDamageListener(DamageListener listener) { - damageListenersList.add(listener); - } - - /** - * {@inheritDoc} - */ - public void removeDamageListener(DamageListener listener) { - damageListenersList.remove(listener); - } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 01:29:42
|
Revision: 44 http://mud4j.svn.sourceforge.net/mud4j/?rev=44&view=rev Author: mpurland Date: 2006-12-23 17:29:41 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Make abstract damage behavior abstract and improve damage events. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/damage/AbstractDamageBehavior.java trunk/mud4j-core/src/java/net/sf/mud4j/damage/DamageEvent.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/damage/AbstractDamageBehavior.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/damage/AbstractDamageBehavior.java 2006-12-24 01:23:22 UTC (rev 43) +++ trunk/mud4j-core/src/java/net/sf/mud4j/damage/AbstractDamageBehavior.java 2006-12-24 01:29:41 UTC (rev 44) @@ -24,31 +24,34 @@ * * @author Matthew Purland */ -public class AbstractDamageBehavior implements DamageBehavior { +public abstract class AbstractDamageBehavior implements DamageBehavior { private List<DamageListener> damageListeners; + private boolean isDestroyed; /** * {@inheritDoc} */ - public void damage() { - // TODO Auto-generated method stub + abstract public void damage(); - } - /** * {@inheritDoc} */ public void destroy() { - // TODO Auto-generated method stub - + isDestroyed = true; + + // Iterate through list of damage listeners + for (DamageListener listener : damageListeners) { + DamageEvent event = new DamageEvent(this); + event.setDestroyed(isDestroyed); + listener.damageDestroyed(event); + } } /** * {@inheritDoc} */ public boolean isDestroyed() { - // TODO Auto-generated method stub - return false; + return isDestroyed; } /** Modified: trunk/mud4j-core/src/java/net/sf/mud4j/damage/DamageEvent.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/damage/DamageEvent.java 2006-12-24 01:23:22 UTC (rev 43) +++ trunk/mud4j-core/src/java/net/sf/mud4j/damage/DamageEvent.java 2006-12-24 01:29:41 UTC (rev 44) @@ -27,19 +27,19 @@ private boolean isDestroyed; - /** - * @param source - */ public DamageEvent(Object source) { super(source); // TODO Auto-generated constructor stub } - + + public void setDestroyed(boolean isDestroyed) { + this.isDestroyed = isDestroyed; + } + /** * Is the object destroyed? */ public boolean isDestroyed() { - // TODO - return false; + return isDestroyed; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 01:23:23
|
Revision: 43 http://mud4j.svn.sourceforge.net/mud4j/?rev=43&view=rev Author: mpurland Date: 2006-12-23 17:23:22 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Implement add/remove damage listeners Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/damage/AbstractDamageBehavior.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/damage/AbstractDamageBehavior.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/damage/AbstractDamageBehavior.java 2006-12-24 01:19:18 UTC (rev 42) +++ trunk/mud4j-core/src/java/net/sf/mud4j/damage/AbstractDamageBehavior.java 2006-12-24 01:23:22 UTC (rev 43) @@ -15,24 +15,21 @@ */ package net.sf.mud4j.damage; +import java.util.List; + /** * Abstract implementation for {@link DamageBehavior}. * + * @todo Add damage observers + * * @author Matthew Purland */ public class AbstractDamageBehavior implements DamageBehavior { - + private List<DamageListener> damageListeners; + /** * {@inheritDoc} */ - public void addDamageListener(DamageListener listener) { - // TODO Auto-generated method stub - - } - - /** - * {@inheritDoc} - */ public void damage() { // TODO Auto-generated method stub @@ -58,8 +55,13 @@ * {@inheritDoc} */ public void removeDamageListener(DamageListener listener) { - // TODO Auto-generated method stub - + damageListeners.remove(listener); } + /** + * {@inheritDoc} + */ + public void addDamageListener(DamageListener listener) { + damageListeners.add(listener); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-24 01:19:23
|
Revision: 42 http://mud4j.svn.sourceforge.net/mud4j/?rev=42&view=rev Author: mpurland Date: 2006-12-23 17:19:18 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Update comment to javadoc. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/services/TelnetConnectionService.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/services/TelnetConnectionService.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/services/TelnetConnectionService.java 2006-12-23 17:18:08 UTC (rev 41) +++ trunk/mud4j-core/src/java/net/sf/mud4j/services/TelnetConnectionService.java 2006-12-24 01:19:18 UTC (rev 42) @@ -31,8 +31,8 @@ this.connection = connection; } - /* (non-Javadoc) - * @see net.sf.mud4j.services.ConnectionService#message(java.lang.StringBuffer) + /** + * {@inheritDoc} */ public void message(String message) throws IOException { OutputStream out = connection.getOutputStream(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-23 17:18:11
|
Revision: 41 http://mud4j.svn.sourceforge.net/mud4j/?rev=41&view=rev Author: mpurland Date: 2006-12-23 09:18:08 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Update comment to be clearer. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/ability/Ability.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/ability/Ability.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/ability/Ability.java 2006-12-23 17:15:51 UTC (rev 40) +++ trunk/mud4j-core/src/java/net/sf/mud4j/ability/Ability.java 2006-12-23 17:18:08 UTC (rev 41) @@ -20,6 +20,9 @@ * Ability interface to create basic interface for abilities that * may be used by commands, or other abilities. * + * An ability is a runnable independent command that acts upon + * a target (Character, Location, Item, etc). + * * @author Matthew Purland */ public interface Ability { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-23 17:15:52
|
Revision: 40 http://mud4j.svn.sourceforge.net/mud4j/?rev=40&view=rev Author: mpurland Date: 2006-12-23 09:15:51 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Fix build by fixing test. Modified Paths: -------------- trunk/mud4j-core/src/test/unit/net/mud4j/game/effect/CharacterEffectTest.java Modified: trunk/mud4j-core/src/test/unit/net/mud4j/game/effect/CharacterEffectTest.java =================================================================== --- trunk/mud4j-core/src/test/unit/net/mud4j/game/effect/CharacterEffectTest.java 2006-12-23 17:13:59 UTC (rev 39) +++ trunk/mud4j-core/src/test/unit/net/mud4j/game/effect/CharacterEffectTest.java 2006-12-23 17:15:51 UTC (rev 40) @@ -52,12 +52,13 @@ public void testCharacterEffectApply() { try { effect.apply(); + effectBehavior.addEffect(effect); } catch (EffectException ex) { } - effectBehavior.addEffect(effect); + assertTrue(character.getEffectBehavior().getEffects().contains(effect)); } @@ -67,11 +68,11 @@ public void testCharacterEffectUndo() { try { effect.undo(); + effectBehavior.removeEffect(effect); } catch (EffectException ex) { } - effectBehavior.removeEffect(effect); assertFalse(character.getEffectBehavior().getEffects().contains(effect)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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-23 17:11:25
|
Revision: 38 http://mud4j.svn.sourceforge.net/mud4j/?rev=38&view=rev Author: mpurland Date: 2006-12-23 09:11:23 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Share project 'mud4j-telnet' into 'https://mud4j.svn.sourceforge.net/svnroot/mud4j' Added Paths: ----------- trunk/mud4j-telnet/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mpu...@us...> - 2006-12-23 17:09:25
|
Revision: 37 http://mud4j.svn.sourceforge.net/mud4j/?rev=37&view=rev Author: mpurland Date: 2006-12-23 09:09:19 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Add start of item attributes. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ItemAttribute.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ItemAttribute.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ItemAttribute.java 2006-12-23 17:09:00 UTC (rev 36) +++ trunk/mud4j-core/src/java/net/sf/mud4j/world/item/ItemAttribute.java 2006-12-23 17:09:19 UTC (rev 37) @@ -21,5 +21,5 @@ * @author Matthew Purland */ public interface ItemAttribute { - + public String getAttributeName(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |