29 lines
396 B
Java
Raw Normal View History

2014-08-21 20:06:49 +03:00
package com.iluwatar;
public enum Action {
HUNT, TALE, GOLD, ENEMY;
public String toString() {
2014-08-21 20:06:49 +03:00
String s = "";
switch (this) {
case ENEMY:
s = "spotted enemies";
break;
case GOLD:
s = "found gold";
break;
case HUNT:
s = "hunted a rabbit";
break;
case TALE:
s = "tells a tale";
break;
default:
break;
}
return s;
};
}