added method trade to Parser
This commit is contained in:
parent
f65449df56
commit
4748643163
|
@ -54,22 +54,15 @@ public class Parser {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Command getAction() {
|
public Command getAction() {
|
||||||
switch (textIO.newEnumInputReader(Command.class).read("What would you like to do?")) {
|
return textIO.newEnumInputReader(Command.class).read("What would you like to do?");
|
||||||
case NEXTPLAYER:
|
}
|
||||||
return NEXTPLAYER;
|
|
||||||
case BUILDSETTLEMENT:
|
public Config.Resource trade(boolean give) {
|
||||||
return BUILDSETTLEMENT;
|
String output = "give";
|
||||||
case BUILDCITY:
|
if (!give){
|
||||||
return BUILDCITY;
|
output = "receive";
|
||||||
case BUILDROAD:
|
|
||||||
return BUILDROAD;
|
|
||||||
case TRADEWITHBANK:
|
|
||||||
return TRADEWITHBANK;
|
|
||||||
case QUIT:
|
|
||||||
return QUIT;
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
return textIO.newEnumInputReader(Config.Resource.class).read("Which Resource would you like to " + give );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue