Skip to content

trymtv/MazeSolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MazeSolver

A practise project in java and datastructures

The project is made for solving pictures of mazes. The mazes are defined by having one pixel wide black walls and one pixel wide white paths. The whole image is bordered with a one pixel wide black border with a white hole in the top and bottom edge. The graph is made by finding potential nodes which are defined as corners of paths. The connected nodes are then solved finding a path from the top to the bottom of the maze and drawn.

A new maze: Maze example Solved 5x5 maze: Solved 10x10 maze: Solved 100x100 maze:

The red spots are marked potential nodes and the green lines are the paths leading from the entry to the exit.

Modules

This module is used for parsing and getting the maze from an image.

ImagePixelArray is used to convert the image to an array containing int values for pixels.

ImageDrawer is used to draw on the maze with the data from the given path of position nodes.

This modulse is used for converting the parsed image to connected nodes.

MazeImage loads the given maze image applyes ImagePixelArray and returns the image.

MazeGraph takes the array of pixels and finds potential nodes and connects them.

MazeMaker makes a whole new iamge of a maze

This module is used to define and implement the search algorithms using a node graph.

PositionNode contains the logic for a node with a given position.

SolveGraph finds the path of the given graph of Nodes given a defined predicate.

About

Java for solving pictures of mazes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages