Cover MISSING_BATTERIES in a test. Needs unducumented "waste" fallback.
This commit is contained in:
parent
3be0cb3596
commit
992bdbf16c
3 changed files with 37 additions and 1 deletions
5
main.c
5
main.c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -2485,8 +2485,32 @@ OK
|
|||
|
||||
The wind whistles coldly past your ears.
|
||||
|
||||
> score
|
||||
|
||||
You scored 207 out of a possible 430, using 405 turns.
|
||||
You have garnered 207 out of a possible 430 points, using 406 turns.
|
||||
|
||||
> inven
|
||||
|
||||
You are currently holding the following:
|
||||
Brass lantern
|
||||
Dwarf's axe
|
||||
|
||||
> waste 2446
|
||||
Game limit is now 31
|
||||
|
||||
You're in Hall of Mists.
|
||||
|
||||
Rough stone steps lead up the dome.
|
||||
|
||||
> z
|
||||
|
||||
Your lamp is getting dim, and you're out of spare batteries. You'd
|
||||
best start wrapping this up.
|
||||
|
||||
OK
|
||||
|
||||
|
||||
You scored 207 out of a possible 430, using 409 turns.
|
||||
|
||||
You may now consider yourself a "Seasoned Adventurer".
|
||||
|
||||
|
|
|
@ -432,3 +432,10 @@ s
|
|||
e
|
||||
take axe
|
||||
listen
|
||||
# At Hall of Mists
|
||||
score
|
||||
inven
|
||||
# Timewarp forward to test exhaustion of replacement batteries
|
||||
waste 2446
|
||||
z
|
||||
# MISSING_BATTERIES is uttered
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue