Pac-Man
Public Member Functions | Protected Member Functions | List of all members
CSienaGhost Class Reference

CSienaGhost is class that represents Siena Ghost. More...

#include <CSienaGhost.h>

Inheritance diagram for CSienaGhost:
Inheritance graph
Collaboration diagram for CSienaGhost:
Collaboration graph

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.
 
- Public Member Functions inherited from CGhost
 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, SMainEntityInfogetMainEntityInfo () const
 Returns info in category SMainEntityInfo. More...
 
- Public Member Functions inherited from CMovingObject
 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.
 
- Protected Member Functions inherited from CGhost
EDirection generalGhostDecision (const CMap &map, const SCoordinates &targetCoords)
 Decides what would be the direction which would be chosen for next move. More...
 
- Protected Member Functions inherited from CMovingObject
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

- Public Types inherited from CMovingObject
enum  EDirection {
  DIRECTION_LEFT, DIRECTION_UP, DIRECTION_RIGHT, DIRECTION_DOWN,
  NO_DIRECTION
}
 Enum of all directions that can moving object go in.
 
- Static Protected Member Functions inherited from CGhost
static bool canStepOn (EGameObject &object)
 Decides if ghost can step on given map object. More...
 
- Static Protected Member Functions inherited from CMovingObject
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...
 
- Protected Attributes inherited from CGhost
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
 
- Protected Attributes inherited from CMovingObject
CMap::CMapCoordinates location_
 

Detailed Description

CSienaGhost is class that represents Siena Ghost.

Constructor & Destructor Documentation

◆ CSienaGhost()

CSienaGhost::CSienaGhost ( const CMap map,
const SCoordinates homeLocation 
)

A constructor constructs new Siena Ghost.

Parameters
[in]mapmap in which the ghost will be
[in]homeLocationstart and home location for the ghost

The documentation for this class was generated from the following files: