Pac-Man
|
CSienaGhost is class that represents Siena Ghost. More...
#include <CSienaGhost.h>
Public Member Functions | |
CSienaGhost (const CMap &map, const SCoordinates &homeLocation) | |
A constructor constructs new Siena Ghost. More... | |
SCoordinates | move (const CMap &map, const SMainEntitiesInfo &mainEntitiesInfo, const CGameInfo &gameInfo) override |
It does Siena Ghost move behaviour, overrides the basic CGhost move. | |
SGameObjectInfo | getObjectInfo (const CGameInfo &gameInfo) const override |
Method implements CGhost virtual method. | |
![]() | |
CGhost (const CMap &map, const SCoordinates &homeLocation) | |
It initializes new ghost. More... | |
void | reset (const CMap &map) |
Method for resetting the ghost to the beginning state. More... | |
void | killed (const CMap &map, uint32_t time) |
The method by which ghost is informed about his death. More... | |
bool | canKill (const CGameInfo &gameInfo) const |
Returns information whether the ghost can kill player. More... | |
bool | canBeKilled (const CGameInfo &gameInfo) const |
Returns information whether the ghost can be killed. More... | |
virtual pair< bool, SMainEntityInfo > | getMainEntityInfo () const |
Returns info in category SMainEntityInfo. More... | |
![]() | |
CMovingObject (const CMap &map, const SCoordinates &location) | |
A constructor of the moving object. More... | |
bool | isOnIntersection () const |
checks whether is object on intersection More... | |
Protected Member Functions | |
SCoordinates | getTargetCoordinates (const CMap &map, const SMainEntitiesInfo &mainEntitiesInfo, const CGameInfo &gameInfo) override |
Specific implementation of CGhost method for Purple Ghost. | |
![]() | |
EDirection | generalGhostDecision (const CMap &map, const SCoordinates &targetCoords) |
Decides what would be the direction which would be chosen for next move. More... | |
![]() | |
void | reset (const CMap &map, SCoordinates &coordinates) |
Method resets the moving object to initial state. More... | |
float | innerGridMove (const SCoordinates &moveVector) |
Method that do the move in the space. More... | |
EGameObject | getTileInDirection (const CMap &map, EDirection direction) const |
Method returns neighbour tile from map in given direction. More... | |
Additional Inherited Members | |
![]() | |
enum | EDirection { DIRECTION_LEFT, DIRECTION_UP, DIRECTION_RIGHT, DIRECTION_DOWN, NO_DIRECTION } |
Enum of all directions that can moving object go in. | |
![]() | |
static bool | canStepOn (EGameObject &object) |
Decides if ghost can step on given map object. More... | |
![]() | |
static EDirection | getOpositeDirectionTo (EDirection directon) |
Method returns opposite direction to given direction. More... | |
static SCoordinates | getMoveVector (EDirection direction, float speed) |
Method returns move vector constructed from given arguments. More... | |
![]() | |
SCoordinates | homeLocation_ |
home location of the ghost | |
uint32_t | timeOfDeath_ = 0 |
time when the ghost was killed | |
bool | alive_ |
information if is the ghost alive | |
bool | randomTileSet_ |
information if a new random tile was set | |
SCoordinates | randomTile_ |
random tile is there for random target of the ghost | |
EDirection | goingFromDirection_ |
holds the direction from which is the ghost going | |
![]() | |
CMap::CMapCoordinates | location_ |
CSienaGhost is class that represents Siena Ghost.
CSienaGhost::CSienaGhost | ( | const CMap & | map, |
const SCoordinates & | homeLocation | ||
) |
A constructor constructs new Siena Ghost.
[in] | map | map in which the ghost will be |
[in] | homeLocation | start and home location for the ghost |