Files
SAE_DEV_JAVA/src/com/charpentierbalocchi/dorfjavatik/model/Tuile.java

60 lines
1.2 KiB
Java
Raw Normal View History

package com.charpentierbalocchi.dorfjavatik.model;
import java.awt.Color;
public class Tuile {
public enum Biome {
RIVIERE, FORET, CHAMP, VILLAGE, MONTAGNE
}
private Biome nord;
private Biome sud;
private Biome est;
private Biome ouest;
public Tuile(Biome nord, Biome sud, Biome est, Biome ouest) {
this.nord = nord;
this.sud = sud;
this.est = est;
this.ouest = ouest;
}
public Biome getNord() {
return nord;
}
public Biome getSud() {
return sud;
}
public Biome getEst() {
return est;
}
public Biome getOuest() {
return ouest;
}
public static Color getColorForBiome(Biome biome) {
switch (biome) {
case RIVIERE:
return Color.BLUE;
case FORET:
return Color.GREEN;
case CHAMP:
return Color.YELLOW;
case VILLAGE:
return Color.RED;
case MONTAGNE:
return Color.GRAY;
default:
return Color.BLACK;
}
}
@Override
public String toString() {
return "[N: " + nord + ", S: " + sud + ", E: " + est + ", O: " + ouest + "]";
}
}