merge dev into test #33

Merged
j23f0712 merged 36 commits from development into dev/test 2024-12-02 17:37:00 +01:00
3 changed files with 28 additions and 3 deletions
Showing only changes of commit 3658c88d72 - Show all commits

View File

@@ -21,6 +21,14 @@ public enum PieceState {
*/ */
HOMEFINISHED; HOMEFINISHED;
public static PieceState getPieceStateByIndex(int index){
if (index < 0 || index >= values().length) {
throw new IllegalArgumentException("");
}
return values()[index];
}
public PieceState next() { public PieceState next() {
return values()[(ordinal() + 1) % values().length]; return values()[(ordinal() + 1) % values().length];
} }

View File

@@ -17,6 +17,12 @@ public enum ShieldState {
*/ */
SUPPRESSED; SUPPRESSED;
public static ShieldState getShieldStateByIndex(int index){
if (index < 0 || index >= values().length) {
throw new IllegalArgumentException("");
}
return values()[index];
}
public ShieldState next() { public ShieldState next() {
return values()[(ordinal() + 1) % values().length]; return values()[(ordinal() + 1) % values().length];