Updated 'PieceState' enumeration.
Updated the 'PieceState' enumeration by removing unused methods from it.
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
package pp.mdga.game;
|
package pp.mdga.game;
|
||||||
|
|
||||||
import com.jme3.network.serializing.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the state of a piece.
|
* Represents the state of a piece.
|
||||||
*/
|
*/
|
||||||
@@ -22,20 +20,4 @@ public enum PieceState {
|
|||||||
* The piece is finished.
|
* The piece is finished.
|
||||||
*/
|
*/
|
||||||
HOMEFINISHED;
|
HOMEFINISHED;
|
||||||
|
|
||||||
PieceState(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
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];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user