class Rules -
More...
#include <Rules.hpp>
|
| Rules () |
| constructor of Rules, define the ruleId of created rule.
|
|
bool | runTheRule (RuleArgsStruct &args) |
| This function aim to run the rule of the card. More...
|
|
std::vector< std::array< unsigned, 2 > > | getNeighbors (unsigned posX, unsigned posY, std::shared_ptr< Map > gameMap) |
|
bool | isThereACityAround (std::array< unsigned, 2 > position, std::shared_ptr< Map > gameMap) |
| This function aim to check if there is a city around a position. More...
|
|
bool | isThereACity (std::array< unsigned, 2 > position, std::shared_ptr< Map > gameMap) |
|
bool | isThereAControlPawn (std::array< unsigned, 2 > position, std::shared_ptr< Map > gameMap) |
|
bool | isThereACaravan (std::array< unsigned, 2 > position, std::shared_ptr< Map > gameMap) |
|
◆ isThereACityAround()
bool Rules::isThereACityAround |
( |
std::array< unsigned, 2 > |
position, |
|
|
std::shared_ptr< Map > |
gameMap |
|
) |
| |
This function aim to check if there is a city around a position.
- Parameters
-
position | the position to check |
gameMap | the map of the game |
- Returns
- true if there is a city around, false otherwise
◆ runTheRule()
This function aim to run the rule of the card.
- Parameters
-
args | : struct containing all the arguments needed to run the rule |
The documentation for this class was generated from the following files: