Ajout Javadoc pour la classe biome
This commit is contained in:
@@ -2,23 +2,58 @@ package fr.monkhanny.dorfromantik.enums;
|
|||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enumération des différents biomes possibles pour les tuiles.
|
||||||
|
*
|
||||||
|
* @version 1.0
|
||||||
|
* @author Lenny FOULOU
|
||||||
|
* @see Color
|
||||||
|
*/
|
||||||
public enum Biome {
|
public enum Biome {
|
||||||
SEA, FIELD, PRE, FOREST, MOUNTAIN;
|
/**
|
||||||
|
* Biome de la mer
|
||||||
|
*/
|
||||||
|
SEA,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Biome de la prairie
|
||||||
|
*/
|
||||||
|
FIELD,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Biome de la prairie
|
||||||
|
*/
|
||||||
|
PRE,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Biome de la forêt
|
||||||
|
*/
|
||||||
|
FOREST,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Biome de la montagne
|
||||||
|
*/
|
||||||
|
MOUNTAIN;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retourne les couleurs associées au biome.
|
||||||
|
*
|
||||||
|
* @return Tableau de couleurs associées au biome
|
||||||
|
*/
|
||||||
public Color[] getBiomeColors() {
|
public Color[] getBiomeColors() {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case SEA:
|
case SEA:
|
||||||
return new Color[] { new Color(25, 133, 208), new Color(53, 159, 235), new Color(0, 103, 178) };
|
return new Color[] { new Color(30, 144, 255), new Color(70, 160, 255), new Color(0, 119, 190) };
|
||||||
case FIELD:
|
case FIELD:
|
||||||
return new Color[] { new Color(232, 214, 28), new Color(247, 228, 28), new Color(210, 195, 0) };
|
return new Color[] { new Color(243, 223, 72), new Color(255, 235, 90), new Color(215, 200, 50) };
|
||||||
case PRE:
|
case PRE:
|
||||||
return new Color[] { new Color(110, 190, 110), new Color(130, 210, 130), new Color(90, 170, 90) };
|
return new Color[] { new Color(120, 200, 120), new Color(140, 220, 140), new Color(100, 180, 100) };
|
||||||
case FOREST:
|
case FOREST:
|
||||||
return new Color[] { new Color(15, 110, 65), new Color(35, 130, 85), new Color(0, 90, 45) };
|
return new Color[] { new Color(34, 139, 76), new Color(50, 160, 95), new Color(20, 120, 60) };
|
||||||
case MOUNTAIN:
|
case MOUNTAIN:
|
||||||
return new Color[] { new Color(110, 110, 110), new Color(130, 130, 130), new Color(90, 90, 90) };
|
return new Color[] { new Color(128, 128, 128), new Color(150, 150, 150), new Color(100, 100, 100) };
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("Unknown Biome : " + this);
|
throw new IllegalArgumentException("Unknown biome : " + this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user