Maze Solver_RWA2_GROUP21
This project is used to solve the maze using wall follower algorithm
|
Functions | |
def | parametrize_maze_files (maze_files) |
def | read_maze (maze_file) |
def | find_tagged_cells (rows, tag) |
def | test_file_name (maze_file) |
def | test_classic_size (maze_file) |
def | test_training_size (maze_file) |
def | test_format (maze_file) |
def | test_boundaries (maze_file) |
def | test_starting_cell_unique (maze_file) |
def | test_starting_cell (maze_file) |
def | test_goal_cells (maze_file) |
def | test_classic_goal_cells (maze_file) |
Basic tests to ensure maze files are properly formatted.
def test_mazes.find_tagged_cells | ( | rows, | |
tag | |||
) |
Find the set of cell positions that have a given tag.
def test_mazes.test_boundaries | ( | maze_file | ) |
Maze boundaries are expected to be closed.
def test_mazes.test_classic_goal_cells | ( | maze_file | ) |
Classic goal cells are always in the middle of the maze.
def test_mazes.test_classic_size | ( | maze_file | ) |
Classic maze size is always 16x16.
def test_mazes.test_file_name | ( | maze_file | ) |
- All maze files must be text files with `.txt` extension. - Only "a-z", "0-9" and "-" characters are allowed.
def test_mazes.test_format | ( | maze_file | ) |
Maze file format must be homogeneous. Vertical walls are represented with a `|`, horizontal walls with `---` and posts with `o`. Even rows must: - Have a post each 4 characters. - Have a wall `---` or nothing ` ` between posts. Odd rows must: - Have a wall `|` or nothing ` ` each 4 characters.
def test_mazes.test_goal_cells | ( | maze_file | ) |
Goal cells must be marked with a "G" and form a rectangular area.
def test_mazes.test_starting_cell | ( | maze_file | ) |
The starting cell is expected to be at the South-West and facing North.
def test_mazes.test_starting_cell_unique | ( | maze_file | ) |
The starting cell, if marked, must be unique.
def test_mazes.test_training_size | ( | maze_file | ) |
Training maze size is the same as classic size, even if not fully used.