Skip to content

Instantly share code, notes, and snippets.

@pauldwhitman
Created March 10, 2013 12:25
Show Gist options
  • Save pauldwhitman/5128364 to your computer and use it in GitHub Desktop.
Save pauldwhitman/5128364 to your computer and use it in GitHub Desktop.
Part of the "Chess in C" blog post series. Macros with numbers and the corresponding piece/breadcrumb type.
#define EMPTY 0
#define KING 1
#define QUEEN 2
#define ROOK 3
#define KNIGHT 4
#define BISHOP 5
#define PAWN 6
#define BREADCRUMB 9
#define POTENTIAL_MOVE_KING 10
#define POTENTIAL_MOVE_QUEEN 20
#define POTENTIAL_MOVE_ROOK 30
#define POTENTIAL_MOVE_KNIGHT 40
#define POTENTIAL_MOVE_BISHOP 50
#define POTENTIAL_MOVE_PAWN 60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment