blob: d9362d8c6c2c081ecafb6ad4a89a708a6570d989 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#ifndef CONSTANTS_H
#define CONSTANTS_H
const unsigned int map_size[2] = { 20, 20 };
const unsigned int field_size[2] = { 16, 16 };
enum Color
{
noColor = 0,
red = (1 << 0),
blue = (1 << 1),
green = (1 << 2),
};
// constants for data transmission to client
namespace transmission
{
typedef unsigned int field_t;
typedef unsigned int mask_t;
const field_t block = (1 << 3);
const field_t bonuspoint = (1 << 4);
const field_t pacman = (1 << 5);
const field_t direction_left = (1 << 6);
const field_t direction_right = (1 << 7);
const field_t direction_up = (1 << 8);
const field_t direction_down = (1 << 9);
const mask_t color_mask = noColor | red | blue | green;
const mask_t type_mask = block | bonuspoint;
const mask_t direction_mask = direction_left | direction_right | direction_up | direction_down;
typedef field_t** map_t;
}
#endif // CONSTANTS_H
|