Develop #1
@@ -0,0 +1,5 @@
|
|||||||
|
package org.project.Interface;
|
||||||
|
|
||||||
|
public interface IDamageUtil {
|
||||||
|
public int GetDamage();
|
||||||
|
}
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
package org.project.item.Accessory;
|
package org.project.item.Accessory;
|
||||||
|
|
||||||
|
import org.project.Interface.IDamageUtil;
|
||||||
import org.project.entity.Entity;
|
import org.project.entity.Entity;
|
||||||
|
|
||||||
public class Weapon extends Accessory {
|
public class Weapon extends Accessory implements IDamageUtil {
|
||||||
private final int Damage;
|
private final int Damage;
|
||||||
|
|
||||||
public Weapon (String name, Entity owner, int price, int health, int maxHealth, int damage) {
|
public Weapon (String name, Entity owner, int price, int health, int maxHealth, int damage) {
|
||||||
@@ -10,6 +11,7 @@ public class Weapon extends Accessory {
|
|||||||
this.Damage = damage;
|
this.Damage = damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int GetDamage() {
|
public int GetDamage() {
|
||||||
return Damage;
|
return Damage;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user