summaryrefslogtreecommitdiffstats
path: root/pacman-c++/constants.h
diff options
context:
space:
mode:
Diffstat (limited to 'pacman-c++/constants.h')
-rw-r--r--pacman-c++/constants.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/pacman-c++/constants.h b/pacman-c++/constants.h
index 278f2b3..a8907b1 100644
--- a/pacman-c++/constants.h
+++ b/pacman-c++/constants.h
@@ -4,20 +4,26 @@
4const unsigned int map_size[2] = { 20, 20 }; 4const unsigned int map_size[2] = { 20, 20 };
5const unsigned int field_size[2] = { 16, 16 }; 5const unsigned int field_size[2] = { 16, 16 };
6 6
7enum Color {
8 noColor = 0,
9 red = (1 << 0),
10 blue = (1 << 1),
11 green = (1 << 2),
12};
13
7// constants for data transmission to client 14// constants for data transmission to client
8namespace transmission { 15namespace transmission {
9 16
10 typedef unsigned int field_t; 17 typedef unsigned int field_t;
11 const field_t red = (1 << 0); 18 typedef unsigned int mask_t;
12 const field_t blue = (1 << 1);
13 const field_t green = (1 << 2);
14 19
15 const field_t box = (1 << 3); 20 const field_t block = (1 << 3);
16 const field_t foo = (1 << 4); 21 const field_t bonuspoint = (1 << 4);
22
23 const mask_t color_mask = noColor | red | blue | green;
24 const mask_t type_mask = block | bonuspoint;
17 25
18 typedef field_t** map_t; 26 typedef field_t** map_t;
19} 27}
20 28
21
22
23#endif // CONSTANTS_H \ No newline at end of file 29#endif // CONSTANTS_H \ No newline at end of file