-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNode.h
More file actions
80 lines (54 loc) · 1.46 KB
/
Node.h
File metadata and controls
80 lines (54 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
Archive: node.h
Author: Diego Fabián Ledesma Motta
code: 1928161
email: diego.ledesma@correounivalle.edu.co
*/
#include <list>
#include <iterator>
#ifndef NODE_HH
#define NODE_HH
class Node {
private:
Node* father;
int motherOp;
int depth;
int cost;
int robotsPosition [2];
int shipsFuel[2];
bool foundItems [2];
bool usingShip [2];
static int map[10][10];
static int itemPositions[2][2];
static int costsArray[7];
static int MaxDeepth; //pending
public:
Node(Node * father, int motherOp, int depth, int cost, int robotsPosition[2],
int shipsFuel[2], bool foundItems[2], bool usingShip[2]);
Node* getFather();
int getMotherOp();
int getDepth();
int getCost();
void showValues();
bool goalReached();
void setMap(int map[10][10]);
void showMap();
bool isPossible(int movement);
Node partialExpansion (int op);
void setTPosition();
bool equivState0 (Node* _node2);
int h();
int getPosition0();
int getPosition1();
int getItem0Position0();
int getItem0Position1();
int getItem1Position0();
int getItem1Position1();
bool getFoundItems0();
bool getFoundItems1();
bool getUsingShip0();
bool getUsingShip1();
};
#else
class Node;
#endif