Improves a toString method.

Makes it more readable and deletes an useless semicolon.
This commit is contained in:
mafagafogigante 2014-11-08 20:38:20 -02:00
parent a4637fcf99
commit bc060309e3

View File

@ -6,23 +6,16 @@ public enum Action {
public String toString() { public String toString() {
String s = "";
switch (this) { switch (this) {
case ENEMY: case ENEMY:
s = "spotted enemies"; return "spotted enemies";
break;
case GOLD: case GOLD:
s = "found gold"; return "found gold";
break;
case HUNT: case HUNT:
s = "hunted a rabbit"; return "hunted a rabbit";
break;
case TALE: case TALE:
s = "tells a tale"; return "tells a tale";
break; }
default: return "";
break;
} }
return s;
};
} }