1TBS reflow with clang-format.
Place1TBS mandatory braces.
Simplify SPDX copyright lines to the shortest canonical form... ...because if we leave them longer than 80 chars, reflow is going to mess them up.
Fix up copyright notices. SPDX wants only one per file.
Turn an odd test into a macro disjunction. Was game.objects[i].prop > STATE_NOTFOUND. This finishes off all the statec comparisons we want to macroize.
Encapsulate object-state state tests and setttings in macros. This isn't a complete refwctoring, just the part than can be done with transparetly correct capture of inlinre logic into macros. No logic changes. Tests pass, 100% coverage.
Structurization of hints.
Structurize object info.
Partial REUSE cmpliance.
Add optional auto-save/restore feature using -a <filename> option To enable use with online Bulletin Board Systems (BBSes) where users may be disconnected unexpectedly, but would naturally want to resume playing their same game, added support for an optional save game path/filename to be specified on the command-line (very similar to "-r <filename>"), except this save/restore file is: 1. automatically loaded/restored if it exists 2. automatically created when starting a new game 3. automatically updated when exiting a game for any reason 4. cannot be changed to a different path/filename by the user Since a BBS server program can be expected to send a SIGHUP or SIGTERM to the game process upon user disconnection (or timeout), those signals are caught and a graceful termination will occur which saves the current game state. Build with ADVENT_AUTOSAVE defined to enable this option. BUG: The 'info' command still reports the save/suspend/pause commands as valid, though they are not when this build option is used (same is true of ADVENT_NOSAVE, and that doesn't apparently bother anyone).
Improve message emission when player wins.
Eliminate a bad code smell.
The FORTRAN-derived longs were semantically ints. Make it so. Note. because we used fixed-length declrations in the right places, this shouldn't break saves. (Besides being right, this will someday make a port to Go a touch easier, if we decide to do that.)
SPDXify the code.
Comment cleanup, semantic types, information hiding.
Abolish as many undifferentiated long variables as possible. Simple counter become ints.
Do not base endgame bonus on arbitrary messages This may break save files, but doesn't, due to padding
Magic-number elimination.
Magic-number elimination.
Various cleanups. * Remove disused macro. * GCC doesn't seem to mind if IGNORE() is left off. * Enumify phase codes. * Use EXIT_* macros in all exit() calls. * How did this even work without extern? * Give advent.h a much-needed makeover. * Use the chomp indicator in YAML string blocks to avoid code ugliness.