Maze Solver_RWA2_GROUP21
This project is used to solve the maze using wall follower algorithm
|
Go to the documentation of this file.
15 namespace rwa2group21 {
54 std::vector<std::pair<int, int>> v5;
60 Robot(): m_position{0,0},m_direction{
'n'},v5{std::pair{0,0}} {
63 std::pair<int, int> m_position;
This file contains the implementation details for algorithm class.
This class is used to drive the robot based on its position and orientation.
static void setText(int x, int y, const std::string &text)
Set the text in a cell at the given coordinates.
Definition: simulator.cpp:88
void turn_left()
Executes when turn left method is called from algorithm class and updates m_position and m_direction ...
Definition: robot.cpp:45
void move_forward()
when turn move forward method is called from algorithm class and updates m_position and m_direction a...
Definition: robot.cpp:6
static void turnLeft()
Turn the robot left.
Definition: simulator.cpp:62
Robot()
A constructor created with member initalisation list with default intial values for position,...
Definition: robot.h:60
void turn_right()
when turn right method is called from algorithm class and updates m_position and m_direction accordin...
Definition: robot.cpp:27
void run(std::string algo)
This method is called from the main file, after which the whole methods of bot traversing around maze...
Definition: algorithm.cpp:238
static void moveForward(int distance=1)
Move the robot forward.
Definition: simulator.cpp:40
char robot_get_direction()
Getter to return the current direction of the robot in the cell.
Definition: robot.h:53
static void turnRight()
Turn the robot right.
Definition: simulator.cpp:56
int robot_get_y()
Getter to return current position of robot along y direction.
Definition: robot.h:41
Functions to control the robot and get information on the maze.
This class implements the search algorithm using a Left hand approach or right hand approach.
Definition: algorithm.h:23
int robot_get_x()
Getter to return current position of robot along x direction.
Definition: robot.h:47
static void setColor(int x, int y, char color)
Set the color of the cell at the given coordinates.
Definition: simulator.cpp:76