mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
added a missing file!
This commit is contained in:
30
src/main/java/forge/game/GameType.java
Normal file
30
src/main/java/forge/game/GameType.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package forge.game;
|
||||
|
||||
/**
|
||||
* TODO: Write javadoc for this type.
|
||||
*
|
||||
*/
|
||||
public enum GameType {
|
||||
Constructed(false),
|
||||
Sealed(true),
|
||||
Draft(true),
|
||||
Quest(true);
|
||||
|
||||
private final boolean bLimited;
|
||||
public final boolean isLimited() { return bLimited; }
|
||||
|
||||
GameType(final boolean isLimited) {
|
||||
bLimited = isLimited;
|
||||
}
|
||||
|
||||
public static GameType smartValueOf(String value){
|
||||
String valToCompate = value.trim();
|
||||
for (GameType v : GameType.values()) {
|
||||
if ( v.name().compareToIgnoreCase(valToCompate) == 0 ) {
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException("No element named " + value + " in enum GameType");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user