Break time...
This commit is contained in:
parent
8ae399eee9
commit
511f55fbad
29
xerbia.c
29
xerbia.c
@ -121,12 +121,9 @@ static void build_construction (int index) {
|
|||||||
|
|
||||||
static int query (void) {
|
static int query (void) {
|
||||||
char input [1024] = "";
|
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);
|
in (& input [index], 1);
|
||||||
|
|
||||||
if (input [index] == '\n') {
|
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;
|
goto requery;
|
||||||
}
|
}
|
||||||
@ -164,21 +161,19 @@ int main (void) {
|
|||||||
construction [index] = random (1, 2);
|
construction [index] = random (1, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (reply = replies; reply != reply_quit; reply = query ()) {
|
for (reply = reply_help; reply != reply_quit; reply = query ()) {
|
||||||
separate ();
|
separate ();
|
||||||
|
|
||||||
print_resources ();
|
switch (reply) {
|
||||||
print_constructions ();
|
case reply_help: print_help (); break;
|
||||||
|
case reply_report: print_resources (); break;
|
||||||
print_help ();
|
case reply_status: print_statistics (); break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
build_construction (granary);
|
build_construction (granary);
|
||||||
build_construction (mine);
|
print_constructions ();
|
||||||
build_construction (storehouse);
|
|
||||||
build_construction (quarry);
|
|
||||||
|
|
||||||
print_statistics ();
|
|
||||||
}
|
|
||||||
|
|
||||||
separate ();
|
separate ();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user