Magic-number elimination.

This commit is contained in:
Eric S. Raymond 2017-07-02 14:47:21 -04:00
parent 369c67840e
commit e712f4c0e0
5 changed files with 12 additions and 10 deletions

View file

@ -19,11 +19,14 @@
#define PANICTIME 15 // time left after closing
#define BATTERYLIFE 2500 // turn limit increment from batteries
#define WORD_NOT_FOUND -1 // "Word not found" flag value for the vocab hash functions.
#define NOT_YET_FOUND -1 // 'Not found" state of treasures */
#define CARRIED -1 // Player is toting it
#define READ_MODE "rb" // b is not needed for POSIX but harmless
#define WRITE_MODE "wb" // b is not needed for POSIX but harmless
/* Special object-state values - integers > 0 are object-specific */
#define STATE_NOTFOUND -1 // 'Not found" state of treasures */
#define STATE_GROUND 0 // After discovered, before messed with
/*
* MOD(N,M) = Arithmetic modulus
* AT(OBJ) = true if on either side of two-placed object