refactor - removed some magic numbers

This commit is contained in:
MeirGavish
2025-06-29 11:58:54 +03:00
parent 1c65652f7b
commit 8bbe707dab
4 changed files with 24 additions and 16 deletions
+3
View File
@@ -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
View File
@@ -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,