Version 1.0 #40

Merged
j23f0779 merged 947 commits from development2 into main 2024-12-13 10:26:49 +01:00
2 changed files with 14 additions and 0 deletions
Showing only changes of commit 3658c88d72 - Show all commits

View File

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

View File

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