1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-29 14:56:44 +02:00

Begin implementing chess

This commit is contained in:
jfreegman
2020-12-19 15:40:00 -05:00
parent a623976a0e
commit 60bdcf0ba5
12 changed files with 1752 additions and 34 deletions

View File

@ -32,7 +32,7 @@ typedef struct Coords {
// don't change these
typedef enum Direction {
NORTH = 0,
NORTH = 0u,
SOUTH = 1,
EAST = 3,
WEST = 4,
@ -60,7 +60,7 @@ typedef time_t TIME_S;
/*
* Return true if dir is a valid Direction.
*/
#define GAME_UTIL_DIRECTION_VALID(dir)(((dir) >= 0) && ((dir) < (INVALID_DIRECTION)))
#define GAME_UTIL_DIRECTION_VALID(dir)((dir) < (INVALID_DIRECTION))
/*
* Returns cardinal direction mapped to `key`.