mirror of
https://gitlab.com/arnekeller/kit-programmieren-ws1920-final2.git
synced 2024-11-24 17:34:57 +00:00
33 lines
693 B
Java
33 lines
693 B
Java
|
package edu.kit.informatik.model;
|
||
|
|
||
|
public enum Card {
|
||
|
WOOD,
|
||
|
METAL,
|
||
|
PLASTIC,
|
||
|
SPIDER,
|
||
|
SNAKE,
|
||
|
TIGER,
|
||
|
THUNDERSTORM;
|
||
|
|
||
|
public static Card parse(String input) {
|
||
|
switch (input) {
|
||
|
case "wood":
|
||
|
return WOOD;
|
||
|
case "metal":
|
||
|
return METAL;
|
||
|
case "plastic":
|
||
|
return PLASTIC;
|
||
|
case "spider":
|
||
|
return SPIDER;
|
||
|
case "snake":
|
||
|
return SNAKE;
|
||
|
case "tiger":
|
||
|
return TIGER;
|
||
|
case "thunderstorm":
|
||
|
return THUNDERSTORM;
|
||
|
default:
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
}
|