-
Notifications
You must be signed in to change notification settings - Fork 0
/
state.hpp
44 lines (35 loc) · 908 Bytes
/
state.hpp
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
#include <string>
#ifndef GRAPH_H
#include "graph.hpp"
#endif
#ifndef VEHICLE_H
#include "vehicle.hpp"
#endif
#define STATE_H
class State {
private:
vector<State*> pickup();
vector<State*> deliver();
vector<State*> move();
public:
Vehicle vehicle;
Graph graph;
State* parent;
int f, g, h;
// Constructor from a copy of it's parent
State(const State &parent_){
this->vehicle = parent_.vehicle;
this->graph = parent_.graph;
};
void setParent(State *parent_){
this->parent = parent_;
}
// Constructor from initial file (for inital state)
State(string input_file);
// Default destructor
~State(){};
vector<State*> getSuccessors();
bool isGoal();
int heuristic(State *state);
void print();
};