Commit graph

435 commits

Author SHA1 Message Date
Eric S. Raymond
e0f160d313 Remove debris from the Makefile. 2017-05-28 13:55:41 -04:00
Eric S. Raymond
113a2a3e94 Add regression test that gets to reservoir.
This allows reproduction of the magic-word bug.
2017-05-28 13:53:59 -04:00
Jason S. Ninneman
1ea2c86641 Restory working seed value for dwarf.log. 2017-05-27 09:23:52 -07:00
Eric S. Raymond
c15a470a56 Restore regression tests. 2017-05-27 10:51:43 -04:00
Eric S. Raymond
4ab32f98a6 More Makefile simplification. 2017-05-27 10:32:11 -04:00
Eric S. Raymond
708d728bb5 Simplify the test makefile. 2017-05-27 10:31:16 -04:00
Eric S. Raymond
67b8d38f53 Correct a dependency. 2017-05-27 10:24:34 -04:00
Eric S. Raymond
6fdf1deccc Update the list of changes. 2017-05-27 10:17:18 -04:00
Jason S. Ninneman
f9eca41f3a Ensure the ZZZZ magic word is reproducible.
This happens by making the SEED command also regenerate the magic word.
2017-05-26 16:34:16 -07:00
Eric S. Raymond
f2043034e5 Use C99 moode of compiler. 2017-05-26 14:03:17 -04:00
Jason S. Ninneman
2270c6ad12 Just say no to encrypting internal state. 2017-05-26 10:21:19 -07:00
Eric S. Raymond
5c4fdc35eb Flush log on interrupt, just for convenience. 2017-05-26 07:22:24 -04:00
Eric S. Raymond
f5cd343fc6 Case correction. 2017-05-26 06:33:44 -04:00
Eric S. Raymond
e4f6bfc109 Death by dwarf test. 2017-05-26 06:16:16 -04:00
Eric S. Raymond
d2643712dd Fix bug that led to comments bnot being ignored. 2017-05-26 05:14:18 -04:00
NHOrus
df23b58032 Different, correct fix of tests
Now without caching .data and extended cleanup
2017-05-26 09:41:54 +03:00
Eric S. Raymond
196a9e1a49 Document test comment format. 2017-05-26 00:40:35 -04:00
Eric S. Raymond
53074fb1ea Regression-test machinery is now documented. 2017-05-26 00:37:24 -04:00
Eric S. Raymond
894724d1c8 First version of regression tests.
Only one test so far but the framework for more is in place.
2017-05-26 00:22:51 -04:00
Eric S. Raymond
7763e1aa22 Repeatable seeding is working. 2017-05-25 18:52:39 -04:00
Eric S. Raymond
79ef3e38c2 Implement fallback handler that looks at the raw command buffer.
With database cinpilation not broken this time...
2017-05-25 18:21:38 -04:00
Eric S. Raymond
76527321b5 Repair CentOS 6 build (fails due to clock_gettime() being undefined)
GitLab issue #2.
2017-05-25 09:09:11 -04:00
Jason S. Ninneman
580565e254 Stop command-logging from non-stdin sources. 2017-05-24 22:31:26 -07:00
Eric S. Raymond
6ba9a7de7f Once again, take srand()/random() out of the initialization chain.
They have exactly the wrong kind of randomness for this job - not
returning consistent sequences across different platforms or C library
versions, and because pseodorandom not really better than sampling
the clock.
2017-05-24 23:36:25 -04:00
Eric S. Raymond
6146406990 Re-enable skipping of #-led comments. 2017-05-24 23:05:19 -04:00
Eric S. Raymond
3a2c0ca199 Reapply "Clean up logic for exiting input loop and scoring." 2017-05-24 22:51:36 -04:00
Jason S. Ninneman
ba1369310d Remove disused label. 2017-05-24 15:43:34 -07:00
Eric S. Raymond
e3e01af7fa Remove cached data on clean.
We've had two instances now of database compilation getting silently
broken and that not noticed because of the caching. Attempt to
forestall this.
2017-05-24 18:29:26 -04:00
Eric S. Raymond
31837249f8 Revert SEED handling and comment orocessing. It broke database compilation.
This code is remarkably like the game it implements - a maze of twisty
little FORTRANisms, all alike.  Very easy to get lost.
2017-05-24 18:24:09 -04:00
Eric S. Raymond
44e7ddc2ed Take srand()/rand() out of the initialization chain...
...they're not guatanteed to produce consistent across platforms or
libc versions.
2017-05-24 11:57:53 -04:00
Eric S. Raymond
c703bd78d9 Clean up logic for exiting input loop and scoring. 2017-05-24 11:16:59 -04:00
Eric S. Raymond
263b5ac3ba Allow comments in logfiles. 2017-05-24 10:07:05 -04:00
Eric S. Raymond
cf219e920b Seed command fully implemented but apparently buggy.
Dwarf appearance is not yet reproducible.
2017-05-24 09:06:41 -04:00
Eric S. Raymond
65c081a0ac Implement stub handler for SEED command. Not hooked up to PRNG yet. 2017-05-24 08:30:06 -04:00
Jason S. Ninneman
627144354c Remove a bad use of tv_nsec. 2017-05-23 23:46:20 -07:00
Jason S. Ninneman
61031ce55c Move a line that got out of place. 2017-05-23 23:42:54 -07:00
Jason S. Ninneman
8a8770375e Add seedable PRNG using an adaptation the original LCG algorithm. 2017-05-23 23:37:56 -07:00
Eric S. Raymond
2bc887c84e Fix the slightly broken prompt test. 2017-05-24 00:28:38 -04:00
Eric S. Raymond
484ca4e9fd Revert structurization changes, they broke database compilation...
...bug showing only if adventure.data was absent.  We'll need to sneak up
on this more carefully.
2017-05-24 00:17:19 -04:00
Eric S. Raymond
7e5448e974 More switch reformatting. 2017-05-23 23:17:57 -04:00
Eric S. Raymond
1e2e24f4d5 Reformat a switch statement for readability. No logic changes. 2017-05-23 23:01:34 -04:00
Eric S. Raymond
f9eb6383f1 Revert a variable name previously changed to be out of the way.
Also, make output from replays easier to interpret by adding prompts.
2017-05-23 22:29:24 -04:00
Eric S. Raymond
f72141fbe3 More structurization. 2017-05-23 20:59:21 -04:00
Eric S. Raymond
8d0587b0ec Echo commands to stdout when replaying...
...makes check loads full transcripts abd more readable.
2017-05-23 20:38:46 -04:00
Eric S. Raymond
f68f3a1205 More globals to the game structure. 2017-05-23 20:34:53 -04:00
Eric S. Raymond
c3add5c206 More global-to-structure moves. 2017-05-23 20:22:35 -04:00
Eric S. Raymond
50ed247042 More comment cleanup. 2017-05-23 19:49:49 -04:00
Eric S. Raymond
bbe68abd30 Fixed case in a comment. 2017-05-23 19:45:18 -04:00
Eric S. Raymond
fa1f859162 Move more globals into the state structure. 2017-05-23 19:40:34 -04:00
Eric S. Raymond
42189d79d7 Begin gathering saveable game state into a structure. Not yet complete.
No logic changes.  A bunch of globals turn into fields (with the same names
except for lowercasing) in struct game_t.

Eventually this will allow drastic simplification of the save/load logic.
2017-05-23 18:47:04 -04:00