1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
enum TypeBatiment {
// Producers
PRODUCER1() {
public boolean isProducer() { return true; }
public float getCoefficient() { return 1.0f; }
},
PRODUCER2() {
public boolean isProducer() { return true; }
public float getCoefficient() { return 2.0f; }
},
// Defense
DEFENSE1() {
public boolean isProducer() { return false; }
public float getCoefficient() { return 1.0f; }
},
DEFENSE2() {
public boolean isProducer() { return false; }
public float getCoefficient() { return 2.0f; }
};
public abstract boolean isProducer();
public abstract float getCoefficient();
} |
Partager