refactor - removed some magic numbers
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#define DIAMONDS 1
|
||||
#define CLUBS 2
|
||||
#define SPADES 3
|
||||
#define NUM_SUITS 4
|
||||
|
||||
// Card ranks
|
||||
#define TWO 0
|
||||
@@ -25,6 +26,8 @@
|
||||
#define QUEEN 10
|
||||
#define KING 11
|
||||
#define ACE 12
|
||||
#define NUM_RANKS 13
|
||||
#define RANK_OFFSET 2 // Because the first rank is 2 and ranks start at 0
|
||||
|
||||
// Card types
|
||||
typedef struct
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
#define MAX_DECK_SIZE 52
|
||||
#define MAX_SELECTION_SIZE 5
|
||||
|
||||
// TODO: Turn into enum?
|
||||
#define BG_ID_CARD_SELECTING 1
|
||||
#define BG_ID_CARD_PLAYING 2
|
||||
#define BG_ID_ROUND_END 3
|
||||
|
||||
enum GameState
|
||||
{
|
||||
GAME_PLAYING,
|
||||
|
||||
Reference in New Issue
Block a user