Enum Class Difficulty
- All Implemented Interfaces:
Serializable
,Comparable<Difficulty>
,Constable
Enum che rappresenta i livelli di difficoltà disponibili nel gioco Wordageddon.
Ogni valore è associato a una stringa descrittiva e a un punteggio massimo
ottenibile tramite il metodo getMaxScoreDifficulty(Difficulty)
.
Livelli disponibili:
EASY
– FacileMEDIUM
– MedioHARD
– Difficile
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
Restituisce il punteggio massimo ottenibile per un dato livello di difficoltà.toString()
Restituisce l’etichetta testuale associata alla difficoltà.static Difficulty
Returns the enum constant of this class with the specified name.static Difficulty[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EASY
-
MEDIUM
-
HARD
-
-
Field Details
-
label
-
-
Constructor Details
-
Difficulty
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getMaxScoreDifficulty
Restituisce il punteggio massimo ottenibile per un dato livello di difficoltà.- Parameters:
d
- livello di difficoltà- Returns:
- punteggio massimo associato (
100
,200
o300
)
-
toString
Restituisce l’etichetta testuale associata alla difficoltà.- Overrides:
toString
in classEnum<Difficulty>
- Returns:
- stringa leggibile come
"Facile"
,"Medio"
o"Difficile"
-