MRMS
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Tile Class Reference

#include <mrm-robot-maze.h>

Public Member Functions

 Tile (int8_t x, int8_t y, Direction breadcrumb)
 
Tilenext ()
 
WallStatus wallGet (Direction direction)
 
void wallSet (Direction direction, WallStatus wallStatus)
 

Public Attributes

Direction breadcrumb
 
int8_t x
 
int8_t y
 

Static Public Attributes

static Tilefirst
 

Detailed Description

Class Tile stores data for tiles: walls, etc. The whole maze consists of one single-linked chain of Tile objects, chained using _chain pointers.

Constructor & Destructor Documentation

◆ Tile()

Tile::Tile ( int8_t  xNow,
int8_t  yNow,
Direction  breadcrumbNow 
)

Constructor

Parameters
x- x coordinate.
y- y coordinate.
breadcrumb- way back to the start tile.

Constructor.

Parameters
x- x coordinate.
y- y coordinate.
breadcrumb- way back to the start tile.

Member Function Documentation

◆ next()

Tile* Tile::next ( )
inline

Enables traversing the chain from outside of the class.

Returns
- link to the next tile in chain.

◆ wallGet()

WallStatus Tile::wallGet ( Direction  direction)
inline

Existence of the wall, victims, etc.

Parameters
direction- direction of the wall.
Returns
status.

◆ wallSet()

void Tile::wallSet ( Direction  direction,
WallStatus  wallStatus 
)
inline

Sets wall's status.

Parameters
direction- direction of the wall.
status- new status.

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