Updated 'ShieldState' enumeration.
Updated the 'ShieldState' enumeration by removing unused methods from it.
This commit is contained in:
		@@ -1,11 +1,8 @@
 | 
			
		||||
package pp.mdga.game;
 | 
			
		||||
 | 
			
		||||
import com.jme3.network.serializing.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Represents the state of a piece's shield.
 | 
			
		||||
 */
 | 
			
		||||
@Serializable
 | 
			
		||||
public enum ShieldState {
 | 
			
		||||
    /**
 | 
			
		||||
     * The shield is not active.
 | 
			
		||||
@@ -19,19 +16,4 @@ public enum ShieldState {
 | 
			
		||||
     * The shield is suppressed, when the piece is on a start node.
 | 
			
		||||
     */
 | 
			
		||||
    SUPPRESSED;
 | 
			
		||||
 | 
			
		||||
    ShieldState(){
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    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