Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
Node.h
Go to the documentation of this file.
1 #pragma once
2 
8 class JAM_Node
9 {
10 private:
18  bool safe;
20  int cost;
22  int fScore;
24  bool listed;
25 
26 public:
32  JAM_Node(int nodeXIndex, int nodeYIndex);
33 
37  ~JAM_Node();
38 
44  void setParentIndex(int parentNodeXIndex, int parentNodeYIndex);
45 
50  int getParentXIndex();
51 
56  int getParentYIndex();
57 
62  void setStartNode(bool startNode);
63 
68  bool getStartNode();
69 
74  void setEndNode(bool endNode);
75 
80  bool getEndNode();
81 
86  void setSafeNode(bool safe);
87 
92  bool getSafeNode();
93 
98  void setCostNode(int cost);
99 
104  int getCostNode();
105 
110  void setFScoreNode(int fScore);
111 
116  int getFScoreNode();
117 
122  int getXIndex();
123 
128  int getYIndex();
129 
134  void setListed(bool listed);
135 
140  bool getListed();
141 };
bool startNode
Definition: Node.h:16
void setCostNode(int cost)
Definition: Node.cpp:116
int getFScoreNode()
Definition: Node.cpp:143
int getParentXIndex()
Definition: Node.cpp:44
bool getStartNode()
Definition: Node.cpp:71
int cost
Definition: Node.h:20
bool getSafeNode()
Definition: Node.cpp:107
void setParentIndex(int parentNodeXIndex, int parentNodeYIndex)
Definition: Node.cpp:34
int parentNodeXIndex
Definition: Node.h:12
int getXIndex()
Definition: Node.cpp:152
void setSafeNode(bool safe)
Definition: Node.cpp:98
bool getListed()
Definition: Node.cpp:179
int getYIndex()
Definition: Node.cpp:161
bool listed
Definition: Node.h:24
void setEndNode(bool endNode)
Definition: Node.cpp:80
void setStartNode(bool startNode)
Definition: Node.cpp:62
bool safe
Definition: Node.h:18
int getParentYIndex()
Definition: Node.cpp:53
void setFScoreNode(int fScore)
Definition: Node.cpp:134
void setListed(bool listed)
Definition: Node.cpp:170
int getCostNode()
Definition: Node.cpp:125
JAM_Node(int nodeXIndex, int nodeYIndex)
Definition: Node.cpp:6
Creates a Node object for use with path finding.
Definition: Node.h:8
bool endNode
Definition: Node.h:16
int fScore
Definition: Node.h:22
int nodeYIndex
Definition: Node.h:14
bool getEndNode()
Definition: Node.cpp:89
int parentNodeYIndex
Definition: Node.h:12
int nodeXIndex
Definition: Node.h:14
~JAM_Node()
Definition: Node.cpp:27