feat: dynamic constraints (Fixes #8)
All checks were successful
Linux arm64 / Build (push) Successful in 37s

This commit is contained in:
2025-01-29 17:19:44 +01:00
parent 5e26bea609
commit c16f2b8f5a
12 changed files with 311 additions and 149 deletions

View File

@@ -8,7 +8,7 @@ public enum Difficulty {
double factor;
String displayName;
Difficulty(String displayName, double factor) {
private Difficulty(String displayName, double factor) {
this.factor = factor;
this.displayName = displayName;
}
@@ -21,4 +21,18 @@ public enum Difficulty {
return factor;
}
private static final String[] difficultyNames;
static {
Difficulty[] diffs = Difficulty.values();
difficultyNames = new String[diffs.length];
for (int i = 0; i < diffs.length; i++) {
difficultyNames[i] = diffs[i].getDisplayName();
}
}
public static String[] getDifficultyNames() {
return difficultyNames;
}
}