merge dev into test #33
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user