diff options
Diffstat (limited to 'pacman-c++/constants.h')
| -rw-r--r-- | pacman-c++/constants.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/pacman-c++/constants.h b/pacman-c++/constants.h index 56d29b7..15d3022 100644 --- a/pacman-c++/constants.h +++ b/pacman-c++/constants.h | |||
| @@ -8,13 +8,16 @@ | |||
| 8 | const unsigned int map_size[2] = { 20, 20 }; | 8 | const unsigned int map_size[2] = { 20, 20 }; |
| 9 | const unsigned int field_size[2] = { 16, 16 }; | 9 | const unsigned int field_size[2] = { 16, 16 }; |
| 10 | 10 | ||
| 11 | enum Color | 11 | namespace Color |
| 12 | { | 12 | { |
| 13 | noColor = 0, | 13 | enum Color |
| 14 | red = (1 << 0), | 14 | { |
| 15 | blue = (1 << 1), | 15 | none = 0, |
| 16 | green = (1 << 2), | 16 | red = (1 << 0), |
| 17 | }; | 17 | blue = (1 << 1), |
| 18 | green = (1 << 2), | ||
| 19 | }; | ||
| 20 | } | ||
| 18 | 21 | ||
| 19 | // constants for data transmission to client | 22 | // constants for data transmission to client |
| 20 | namespace transmission | 23 | namespace transmission |
| @@ -32,7 +35,7 @@ namespace transmission | |||
| 32 | const field_t direction_up = (1 << 8); | 35 | const field_t direction_up = (1 << 8); |
| 33 | const field_t direction_down = (1 << 9); | 36 | const field_t direction_down = (1 << 9); |
| 34 | 37 | ||
| 35 | const mask_t color_mask = noColor | red | blue | green; | 38 | const mask_t color_mask = Color::none | Color::red | Color::blue | Color::green; |
| 36 | const mask_t type_mask = block | bonuspoint; | 39 | const mask_t type_mask = block | bonuspoint; |
| 37 | const mask_t direction_mask = direction_none | direction_left | direction_right | direction_up | direction_down; | 40 | const mask_t direction_mask = direction_none | direction_left | direction_right | direction_up | direction_down; |
| 38 | 41 | ||
