Cover MISSING_BATTERIES in a test. Needs unducumented "waste" fallback.

This commit is contained in:
Eric S. Raymond 2017-07-17 06:07:01 -04:00
parent 3be0cb3596
commit 992bdbf16c
3 changed files with 37 additions and 1 deletions

5
main.c
View file

@ -147,6 +147,11 @@ static bool fallback_handler(struct command_t command)
--game.turns;
return true;
}
else if (sscanf(buf, "waste %ld", &sv) == 1) {
game.limit -= sv;
printf("Game limit is now %ld\n", game.limit);
return true;
}
return false;
}