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() {
String s = "";
switch (this) {
case ENEMY:
s = "spotted enemies";
break;
return "spotted enemies";
case GOLD:
s = "found gold";
break;
return "found gold";
case HUNT:
s = "hunted a rabbit";
break;
return "hunted a rabbit";
case TALE:
s = "tells a tale";
break;
default:
break;
return "tells a tale";
}
return s;
};
return "";
}
}