Skip to content

Commit d501b50

Browse files
added some comments to PathFinder.hpp
1 parent c6b3d01 commit d501b50

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Main.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include <iostream>
22
#include <SFML/Graphics.hpp>
3-
#include "Grid.hpp"
43
#include "PathFinder.hpp"
54

65
using namespace sf;
@@ -107,5 +106,5 @@ int main()
107106
window->display();
108107
}
109108

110-
delete(grid);
109+
delete(pathFinder);
111110
}

PathFinder.hpp

+8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
#ifndef PATH_FINDER_H
22
#define PATH_FINDER_H
33

4+
#include <stdio.h>
45
#include "SFML/Graphics.hpp"
56
#include "Grid.hpp"
67
#include "GridCellStates.hpp"
78

9+
using namespace std;
810
using namespace sf;
911

12+
/// <summary>
13+
/// A class for finding the shortest path between two cells in a grid
14+
/// </summary>
1015
class PathFinder
1116
{
1217
public:
@@ -44,6 +49,9 @@ class PathFinder
4449

4550
};
4651

52+
/// <summary>
53+
/// Initialize the nodes in the grid
54+
/// </summary>
4755
void PathFinder::initializeNodes()
4856
{
4957
for (int x = 0; x < grid->getGridWidth(); x++)

0 commit comments

Comments
 (0)