4 //! @brief Class representing a cell in the map.
7 //! Class representing a cell in the map
9 //! Will most likely change in a
10 //! future version. This class was implemented in order to facilitate
11 //! the pathfinding algorithm in the findValidPath function in the Map class.
16 Node(int newId
, int newRow
, int newColumn
);
17 Node(int newId
, int newRow
, int newColumn
, int newHeuristic
, bool newTraversable
);
19 //! Sets the Node's heuristic value.
20 //! @param newHeuristic The new heuristic value to set.
21 void setHeuristic(int newHeuristic
);
23 //! Sets the Node's id.
24 //! @param newId The new id value to set.
25 void setId(int newId
);
27 //! Sets the Node's row.
28 //! @param newRow The new row value to set.
29 void setRow(int newRow
);
31 //! Sets the Nodes's column.
32 //! @param newColumn The new column value to set.
33 void setColumn(int newColumn
);
35 //! Sets the Node's bool traversable.
36 //! @param newTraversable The new traversable value to set.
37 void setTraversable(bool newTraversable
);
39 //! @return The Node's heuristic.
42 //! @return The Node's id.
45 //! @return The Node's row.
48 //! @return The Node's column.
51 //! @return The Node's traversable field.
52 bool getTraversable();
55 //! The heuristic is the number of cells the Node is away from the end cell. If it is right next
56 //! to the end cell, the value will be 1.
59 //! The id of a Node is its linear position in the map. In other words, it's the x-th cell the map. 0 based.
62 //! The row the Node is located on.
65 //! The column the node is located on.
68 //! bool indicating whether or not the Node can be traversed.