CSCI 200 - Fall 2024
Foundational Programming Concepts & Design

A6 - SFML: Maze Runner

→This assignment is due by Thursday, December 05, 2024, 11:59 PM.←
→ As with all assignments, this must be an individual effort and cannot be pair programmed. Any debugging assistance must follow the course collaboration policy and be cited in the comment header block for the assignment.←

Jump To: Rubric Submission

For this assignment you will build upon Lab6C. This piece will now animate a solution to the maze, such as Maze 7 below.

Maze 7

Solve the Maze (Maybe)


Before the maze has been drawn, ask the user via the terminal how they wish to solve the maze. Either by BFS or by DFS.

Based on the user's selection, search the maze using BFS with a Queue or DFS with a Stack as appropriate. Begin your search at the S space and continue until the E space is reached or the search is exhausted.

When the search is complete, draw the maze with visited cells colored Magenta.

An example of a successful BFS search is shown below:

Maze 7 BFS

An example of a successful DFS search is shown below:

Maze 7 DFS

An example of an unsuccessful search is shown below:

Maze 4 Unsolvable

Animating the Solve


To animate each step of the search process, we'll use the draw loop as the loop for our search process. Each iteration, we will do a few steps:

An example of a partial search in progress is shown below:

Maze 3 Partially Solved

Extra Credit


There are two potential extra credit pieces:

  1. Color potential cells to explore Blue. These are locations that have been added to the neighbors to process list but not yet visited to check.
  2. Color the path from start to end in Yellow.

An example of both is shown below;

Maze 3 DFS Path

Testing


The graders will build your program with the Makefile you provide to match your code structure and run your program against five private test mazes.


Grading Rubric


Your submission will be graded according to the following rubric:

PointsRequirement Description
0.5Submitted correctly by Thursday, December 05, 2024, 11:59 PM
0.5Project builds without errors nor warnings.
2.0Best Practices and Style Guide followed.
0.5Program follows specified user I/O flow.
0.5Public and private tests successfully passed.
2.0Fully meets specifications.
6.00Total Points

Extra Credit PointsRequirement Description
+1 Display neighboring squares to be checked in blue
+1 When a solution is found, color the path from start to end in yellow (this does not need to be the shortest path)


Submission


Always, always, ALWAYS update the header comments at the top of your main.cpp file. And if you ever get stuck, remember that there is LOTS of help available.

Zip together your main.cpp, Makefile, *.hpp, *.h, *.cpp files and name the zip file A6.zip. Upload this zip file to Canvas under A6.


→This assignment is due by Thursday, December 05, 2024, 11:59 PM.←
→ As with all assignments, this must be an individual effort and cannot be pair programmed. Any debugging assistance must follow the course collaboration policy and be cited in the comment header block for the assignment.←