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.
|