@Test public void testClone() { final Weapon clone = (Weapon) weapon1.clone(); assertEquals(weapon1.amount, clone.amount); assertEquals(weapon1.properties, clone.properties); assertNotSame(weapon1, clone); final Weapon clone2 = (Weapon) weapon2.clone(); assertEquals(weapon2.amount, clone2.amount); assertEquals(weapon2.properties, clone2.properties); assertNotSame(weapon2, clone2); }
@Override public Item clone() { return new Weapon((WeaponProperties) properties, amount); }
Weapon extends AbstractEquipableItem { @Override public Item clone() { return new Weapon((WeaponProperties) properties, amount); } }
Weapon extends AbstractEquipableItem { @Override public Item clone() { return new Weapon((WeaponProperties) properties, amount); } Weapon(WeaponProperties properties, int amount); }
Weapon extends AbstractEquipableItem { @Override public Item clone() { return new Weapon((WeaponProperties) properties, amount); } Weapon(WeaponProperties properties, int amount); @Override Item clone(); @Override void use(Character character); boolean getStabs(); int getPiercingDamage(); int getMinHit(); int getMaxHit(); int getDamage(); }
Weapon extends AbstractEquipableItem { @Override public Item clone() { return new Weapon((WeaponProperties) properties, amount); } Weapon(WeaponProperties properties, int amount); @Override Item clone(); @Override void use(Character character); boolean getStabs(); int getPiercingDamage(); int getMinHit(); int getMaxHit(); int getDamage();  }