-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGridCellStates.hpp
46 lines (40 loc) · 974 Bytes
/
GridCellStates.hpp
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
38
39
40
41
42
43
44
45
46
#ifndef GRIDVAL_H
#define GRIDVAL_H
#include <SFML/Graphics.hpp>
enum class GridValue
{
INVALID = -1,
UNOCCUPIED,
OCCUPIED,
SELECTED,
DESTINATION,
START
};
enum class GridStateColor : unsigned long
{
INVALID_COLOR,
OCCUPIED_COLOR = 0xFFFFFFFF, // white
UNOCCUPED_COLOR = 0x00000000, // transparent
SELECTED_COLOR = 0xFF000064, // slightly transparent red
DEST_COLOR = 0x0097FFFF, // light blue
START_COLOR = 0xFFFB00FF // bright yellow
};
GridStateColor valToColor(GridValue val)
{
switch (val)
{
case GridValue::OCCUPIED:
return GridStateColor::OCCUPIED_COLOR;
case GridValue::UNOCCUPIED:
return GridStateColor::UNOCCUPED_COLOR;
case GridValue::SELECTED:
return GridStateColor::SELECTED_COLOR;
case GridValue::DESTINATION:
return GridStateColor::DEST_COLOR;
case GridValue::START:
return GridStateColor::START_COLOR;
default:
return GridStateColor::INVALID_COLOR;
}
}
#endif