Pacman  1.0
Pacman game
Fonctions membres publiques | Attributs privés | Liste de tous les membres
Référence de la classe Intersection

Intersection class. Plus de détails...

#include <Intersection.h>

Fonctions membres publiques

 Intersection (int x, int y)
 Construct a new Intersection object. Plus de détails...
 
 ~Intersection ()
 
int getX () const
 
int getY () const
 
void setUp (std::shared_ptr< Intersection > up)
 
std::shared_ptr< IntersectiongetUp () const
 
void setDown (std::shared_ptr< Intersection > down)
 
std::shared_ptr< IntersectiongetDown () const
 
void setLeft (std::shared_ptr< Intersection > left)
 
std::shared_ptr< IntersectiongetLeft () const
 
void setRight (std::shared_ptr< Intersection > right)
 
std::shared_ptr< IntersectiongetRight () const
 
std::vector< std::shared_ptr< Intersection > > getOptions () const
 Get the Options object. Plus de détails...
 
int getDirection (std::shared_ptr< Intersection > dest) const
 Get the Direction object. Plus de détails...
 

Attributs privés

int x_pixel
 
int y_pixel
 
std::shared_ptr< Intersectionup = nullptr
 
std::shared_ptr< Intersectiondown = nullptr
 
std::shared_ptr< Intersectionleft = nullptr
 
std::shared_ptr< Intersectionright = nullptr
 

Description détaillée

Intersection class.

class represents an intersection in the maze. It contains the x and y coordinates of the intersection, as well as pointers to the intersections that are up, down, left, and right of it.

Documentation des constructeurs et destructeur

◆ Intersection()

Intersection::Intersection ( int  x,
int  y 
)

Construct a new Intersection object.

Paramètres
x
y

◆ ~Intersection()

Intersection::~Intersection ( )

Documentation des fonctions membres

◆ getDirection()

int Intersection::getDirection ( std::shared_ptr< Intersection dest) const

Get the Direction object.

Paramètres
dest
Renvoie
the direction you need to go to get to the destination from this intersection

◆ getDown()

std::shared_ptr< Intersection > Intersection::getDown ( ) const

◆ getLeft()

std::shared_ptr< Intersection > Intersection::getLeft ( ) const

◆ getOptions()

std::vector< std::shared_ptr< Intersection > > Intersection::getOptions ( ) const

Get the Options object.

Renvoie
the non-null neighbors of the intersection

◆ getRight()

std::shared_ptr< Intersection > Intersection::getRight ( ) const

◆ getUp()

std::shared_ptr< Intersection > Intersection::getUp ( ) const

◆ getX()

int Intersection::getX ( ) const

◆ getY()

int Intersection::getY ( ) const

◆ setDown()

void Intersection::setDown ( std::shared_ptr< Intersection down)

◆ setLeft()

void Intersection::setLeft ( std::shared_ptr< Intersection left)

◆ setRight()

void Intersection::setRight ( std::shared_ptr< Intersection right)

◆ setUp()

void Intersection::setUp ( std::shared_ptr< Intersection up)

Documentation des données membres

◆ down

std::shared_ptr<Intersection> Intersection::down = nullptr
private

◆ left

std::shared_ptr<Intersection> Intersection::left = nullptr
private

◆ right

std::shared_ptr<Intersection> Intersection::right = nullptr
private

◆ up

std::shared_ptr<Intersection> Intersection::up = nullptr
private

◆ x_pixel

int Intersection::x_pixel
private

◆ y_pixel

int Intersection::y_pixel
private

La documentation de cette classe a été générée à partir du fichier suivant :