Class which provides arithmetics operations over map data using map element constants.
More...
#include <Map.h>
|
static bool | is_walkable_element (element el) |
| Checks if element is waklable (groud or target) More...
|
|
static bool | is_barrel_movable_element (element el, int barrel_info) |
| Check if element is movable and with no barrel. More...
|
|
static element | make_full_element (element el, int barrel_info) |
| Makes data complete element from gamegrid element and barrel information. More...
|
|
static element | make_sokoban_element (element el, element sokoban_el) |
| Makes data complete sokoban element from gamegrid element and sokoban element. More...
|
|
static bool | is_dead_position_triangle (element el_1, int b_1, element el_2, int b_2, element el_3, int b_3) |
| Checks if elements of corner triangle allows to move barrel or not (dead position). More...
|
|
static int | number_of_new_barrel_on_target (element el_of_new_barrel, element el_of_old_barrel) |
| Count the number of new barrel on target (+1, 0, -1). More...
|
|
Class which provides arithmetics operations over map data using map element constants.
- See also
- Map
◆ is_barrel_movable_element()
static bool MapUtils::is_barrel_movable_element |
( |
element |
el, |
|
|
int |
barrel_info |
|
) |
| |
|
static |
Check if element is movable and with no barrel.
- Parameters
-
el | Element which is checked |
barrel_info | Information about the barrel for this element. 0 no barrel, otherwise barrel. |
- Returns
- If it is possible to move barrel on this element.
◆ is_dead_position_triangle()
static bool MapUtils::is_dead_position_triangle |
( |
element |
el_1, |
|
|
int |
b_1, |
|
|
element |
el_2, |
|
|
int |
b_2, |
|
|
element |
el_3, |
|
|
int |
b_3 |
|
) |
| |
|
static |
Checks if elements of corner triangle allows to move barrel or not (dead position).
@ el_1 Element of the first part of corner. @ b_1 Barrel information of the first part of corner. @ el_2 Element of the second part of corner. @ b_2 Barrel information of the second part of corner. @ el_3 Element of the third part of corner. @ b_3 Barrel information of the third part of corner.
- Returns
- True if corner does not allow to move barrel.
◆ is_walkable_element()
static bool MapUtils::is_walkable_element |
( |
element |
el | ) |
|
|
static |
Checks if element is waklable (groud or target)
- Parameters
-
el | Element which is checked. |
- Returns
- If element el is walkable.
◆ make_full_element()
static element MapUtils::make_full_element |
( |
element |
el, |
|
|
int |
barrel_info |
|
) |
| |
|
static |
Makes data complete element from gamegrid element and barrel information.
- Parameters
-
el | Gamegrid element. |
barrel_info | Information about the barrel for this element. 0 no barrel, otherwise barrel. |
- Returns
- Data complete game element.
◆ make_sokoban_element()
Makes data complete sokoban element from gamegrid element and sokoban element.
- Parameters
-
el | Gamegrid element |
sokoban_el | Sokoban element. |
- Returns
- Data complete game element.
◆ number_of_new_barrel_on_target()
static int MapUtils::number_of_new_barrel_on_target |
( |
element |
el_of_new_barrel, |
|
|
element |
el_of_old_barrel |
|
) |
| |
|
static |
Count the number of new barrel on target (+1, 0, -1).
- Parameters
-
el_of_new_barrel | New element which barrel is now sitting on. |
el_of_old_barrel | Original element which barrel was sitting on previously. |
- Returns
- 1, 0 or -1 according to the change.
The documentation for this class was generated from the following file: