Home - michael-lemberger/Pacman-Gps-Game GitHub Wiki
- Authors: Liron Arad, Maoz Grossman & Michael Lemberger
First we understood that in order to find the shortest path to the next fruit, we needed to avoid the walls of the blocks. So we translated the blocks to 4 different vertexes. now all we had to do is formatting a path for the player through those vertexes.
So we built a concept, a graph connected by neighbors. while considering the walls.
We had an Dijkstra algorithm by "Boaz ben-moshe", but we needed a class that finds the neighbors
of every fruit (not part of the Dijakstra Algorithm) and after that saving the information about the closest fruit.
A thread based on "Boaz ben-moshe"'s thread.
We added a rotate function to generate the general direction of the player in any given time.
A node representing a vertex with metadata. contains the neighbors.
Represents an edge between two vertexes.