From: Eric S. Raymond Date: Wed, 31 May 2017 00:08:55 +0000 (-0400) Subject: Fix things so seed doesn't cost clock time. X-Git-Tag: seed X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=6a6670e3ca6432e28509ed96f51b0c63d95e8356;p=open-adventure.git Fix things so seed doesn't cost clock time. --- diff --git a/main.c b/main.c index 653b744..ea620fc 100644 --- a/main.c +++ b/main.c @@ -156,6 +156,8 @@ static bool fallback_handler(signed char *buf) 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. + --TURNS; // here we reconfigure any global game state that uses random numbers ZZWORD=RNDVOC(3,0); return true; diff --git a/tests/death-jump.chk b/tests/death-jump.chk index 55e648c..9f7e6ad 100644 --- a/tests/death-jump.chk +++ b/tests/death-jump.chk @@ -133,7 +133,7 @@ to try to reincarnate you? OK -You scored 51 out of a possible 430, using 19 turns. +You scored 51 out of a possible 430, using 18 turns. Your score qualifies you as a novice class adventurer. diff --git a/tests/dwarf.chk b/tests/dwarf.chk index ee767e1..8399156 100644 --- a/tests/dwarf.chk +++ b/tests/dwarf.chk @@ -379,7 +379,7 @@ to try to reincarnate you? OK -You scored 81 out of a possible 430, using 56 turns. +You scored 81 out of a possible 430, using 55 turns. Your score qualifies you as a novice class adventurer. diff --git a/tests/pirate.chk b/tests/pirate.chk index e3e37f6..dbfd13d 100644 --- a/tests/pirate.chk +++ b/tests/pirate.chk @@ -1902,7 +1902,7 @@ There is a massive vending machine here, swung back to reveal a southward passage. > -You scored 219 out of a possible 430, using 314 turns. +You scored 219 out of a possible 430, using 313 turns. You may now consider yourself a "Seasoned Adventurer".