Maze Solver_RWA2_GROUP21
This project is used to solve the maze using wall follower algorithm
rwa2group21::Robot Class Reference

Public Member Functions

void turn_left ()
 Executes when turn left method is called from algorithm class and updates m_position and m_direction accordingly. Calls the turn_left of Simulator class to turn the robot 90 degrees in CCW.
 
void turn_right ()
 when turn right method is called from algorithm class and updates m_position and m_direction accordingly. Calls the turn_right of Simulator class to turn the robot 90 degrees in CW
 
void move_forward ()
 when turn move forward method is called from algorithm class and updates m_position and m_direction accordingly. Calls the move_forward of Simulator class to move robot one cell forward. This method is called after robot turning left and right as well.
 
int robot_get_y ()
 Getter to return current position of robot along y direction. More...
 
int robot_get_x ()
 Getter to return current position of robot along x direction. More...
 
char robot_get_direction ()
 Getter to return the current direction of the robot in the cell. More...
 
 Robot ()
 A constructor created with member initalisation list with default intial values for position, direction. More...
 

Public Attributes

std::vector< std::pair< int, int > > v5
 

Constructor & Destructor Documentation

◆ Robot()

rwa2group21::Robot::Robot ( )
inline

A constructor created with member initalisation list with default intial values for position, direction.

Member Function Documentation

◆ robot_get_direction()

char rwa2group21::Robot::robot_get_direction ( )
inline

Getter to return the current direction of the robot in the cell.

Returns
char , any of the values ['n','s','e','w']

◆ robot_get_x()

int rwa2group21::Robot::robot_get_x ( )
inline

Getter to return current position of robot along x direction.

Returns
int , a value from 0-15 denoting robot's x position

◆ robot_get_y()

int rwa2group21::Robot::robot_get_y ( )
inline

Getter to return current position of robot along y direction.

Returns
int , a value from 0-15 denoting robot's y position

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