summary refs log tree commit diff
path: root/bin/klon.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-04-09 00:41:52 -0400
committerJune McEnroe <june@causal.agency>2018-04-09 00:41:52 -0400
commit2e0cd8a26115edd5ba2cfc8b798c3ba67d980ed4 (patch)
treed769946d07ace7aae760a202b04a4798c56a6030 /bin/klon.c
parentstatic_assert PNG header size in pngo and glitch (diff)
downloadsrc-2e0cd8a26115edd5ba2cfc8b798c3ba67d980ed4.tar.gz
src-2e0cd8a26115edd5ba2cfc8b798c3ba67d980ed4.zip
Use enum instead of #define for some constants
Diffstat (limited to 'bin/klon.c')
-rw-r--r--bin/klon.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/klon.c b/bin/klon.c
index 65058915..05adc278 100644
--- a/bin/klon.c
+++ b/bin/klon.c
@@ -25,11 +25,13 @@
 
 typedef uint8_t Card;
 
-#define MASK_RANK   (0x0F)
-#define MASK_SUIT   (0x30)
-#define MASK_COLOR  (0x10)
-#define MASK_UP     (0x40)
-#define MASK_SELECT (0x80)
+enum {
+    MASK_RANK   = 0x0F,
+    MASK_SUIT   = 0x30,
+    MASK_COLOR  = 0x10,
+    MASK_UP     = 0x40,
+    MASK_SELECT = 0x80,
+};
 
 enum {
     SUIT_CLUB    = 0x00,