Command Class(Cleanup and Javadoc)
This commit is contained in:
parent
d1d6db894b
commit
211c2fda63
|
@ -1,6 +1,9 @@
|
||||||
package ch.zhaw.catan;
|
package ch.zhaw.catan;
|
||||||
|
|
||||||
//TODO:JavaDoc
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
public enum Command {
|
public enum Command {
|
||||||
NEXT_PLAYER("next player"), BUILD_SETTLEMENT("build settlement"), BUILD_CITY("build city"),
|
NEXT_PLAYER("next player"), BUILD_SETTLEMENT("build settlement"), BUILD_CITY("build city"),
|
||||||
BUILD_ROAD("build road"), TRADE_WITH_BANK("trade with bank"), QUIT("quit");
|
BUILD_ROAD("build road"), TRADE_WITH_BANK("trade with bank"), QUIT("quit");
|
||||||
|
@ -12,6 +15,12 @@ public enum Command {
|
||||||
this.commandWord = commandWord;
|
this.commandWord = commandWord;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overrides the toString method and lets it give out the commandWord as a string when used.
|
||||||
|
*
|
||||||
|
* @return commandWord as a String
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return commandWord;
|
return commandWord;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue