Issue 893 (#1014)
* Using static object to reduce memory foot prints * Updating README along with name of static fields * Updating code as per review comments * Updating code as per review comments * Updating doc as per new code
This commit is contained in:
committed by
Ilkka Seppälä
parent
a9dfd7e809
commit
cdb80b8ddd
@ -42,13 +42,13 @@ public interface Blacksmith {
|
||||
|
||||
public class ElfBlacksmith implements Blacksmith {
|
||||
public Weapon manufactureWeapon(WeaponType weaponType) {
|
||||
return new ElfWeapon(weaponType);
|
||||
return ELFARSENAL.get(weaponType);
|
||||
}
|
||||
}
|
||||
|
||||
public class OrcBlacksmith implements Blacksmith {
|
||||
public Weapon manufactureWeapon(WeaponType weaponType) {
|
||||
return new OrcWeapon(weaponType);
|
||||
return ORCARSENAL.get(weaponType);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
Reference in New Issue
Block a user