Break time...
This commit is contained in:
parent
8ae399eee9
commit
511f55fbad
31
xerbia.c
31
xerbia.c
@ -121,12 +121,9 @@ static void build_construction (int index) {
|
||||
|
||||
static int query (void) {
|
||||
char input [1024] = "";
|
||||
int index = reply_help;
|
||||
|
||||
int index;
|
||||
|
||||
requery:
|
||||
|
||||
for (index = 0; index < 1024; ++index) {
|
||||
requery: for (index = 0; index < 1024; ++index) {
|
||||
in (& input [index], 1);
|
||||
|
||||
if (input [index] == '\n') {
|
||||
@ -142,7 +139,7 @@ static int query (void) {
|
||||
}
|
||||
}
|
||||
|
||||
print_help ();
|
||||
print ("Incorrect /1reply/-, type '/3help/-' to list replies.\n");
|
||||
|
||||
goto requery;
|
||||
}
|
||||
@ -164,22 +161,20 @@ int main (void) {
|
||||
construction [index] = random (1, 2);
|
||||
}
|
||||
|
||||
for (reply = replies; reply != reply_quit; reply = query ()) {
|
||||
for (reply = reply_help; reply != reply_quit; reply = query ()) {
|
||||
separate ();
|
||||
|
||||
print_resources ();
|
||||
print_constructions ();
|
||||
|
||||
print_help ();
|
||||
|
||||
build_construction (granary);
|
||||
build_construction (mine);
|
||||
build_construction (storehouse);
|
||||
build_construction (quarry);
|
||||
|
||||
print_statistics ();
|
||||
switch (reply) {
|
||||
case reply_help: print_help (); break;
|
||||
case reply_report: print_resources (); break;
|
||||
case reply_status: print_statistics (); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
build_construction (granary);
|
||||
print_constructions ();
|
||||
|
||||
separate ();
|
||||
|
||||
print ("/0The end!/-\n");
|
||||
|
Loading…
Reference in New Issue
Block a user