File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
#include < iostream>
2
2
#include < SFML/Graphics.hpp>
3
- #include " Grid.hpp"
4
3
#include " PathFinder.hpp"
5
4
6
5
using namespace sf ;
@@ -107,5 +106,5 @@ int main()
107
106
window->display ();
108
107
}
109
108
110
- delete (grid );
109
+ delete (pathFinder );
111
110
}
Original file line number Diff line number Diff line change 1
1
#ifndef PATH_FINDER_H
2
2
#define PATH_FINDER_H
3
3
4
+ #include < stdio.h>
4
5
#include " SFML/Graphics.hpp"
5
6
#include " Grid.hpp"
6
7
#include " GridCellStates.hpp"
7
8
9
+ using namespace std ;
8
10
using namespace sf ;
9
11
12
+ // / <summary>
13
+ // / A class for finding the shortest path between two cells in a grid
14
+ // / </summary>
10
15
class PathFinder
11
16
{
12
17
public:
@@ -44,6 +49,9 @@ class PathFinder
44
49
45
50
};
46
51
52
+ // / <summary>
53
+ // / Initialize the nodes in the grid
54
+ // / </summary>
47
55
void PathFinder::initializeNodes ()
48
56
{
49
57
for (int x = 0 ; x < grid->getGridWidth (); x++)
You can’t perform that action at this time.
0 commit comments