Break time...

This commit is contained in:
Ognjen Milan Robovic 2024-06-16 14:51:03 -04:00
parent 8ae399eee9
commit 511f55fbad

View File

@ -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,21 +161,19 @@ 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 ();
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);
build_construction (mine);
build_construction (storehouse);
build_construction (quarry);
print_statistics ();
}
print_constructions ();
separate ();