-static bool fallback_handler(struct command_t command)
-/* fallback handler for commands not handled by FORTRANish parser */
-{
- long sv;
- char buf[DIM(command.raw1) + DIM(command.raw2) + 1];
- sprintf(buf, "%s %s", command.raw1, command.raw2);
-
- if (sscanf(buf, "seed %ld", &sv) == 1) {
- set_seed(sv);
- printf("Seed set to %ld\n", sv);
- // autogenerated, so don't charge user time for it.
- --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;
-}
-