Go to the documentation of this file.
55 { std::vector<RacetrackState> neighbors;
GetSuccessors(stateID, neighbors);
return (
int)neighbors.size(); }
void GetActions(const RacetrackState &nodeID, std::vector< RacetrackMove > &actions) const
bool operator!=(const RacetrackState &l1, const RacetrackState &l2)
void OpenGLDraw(const RacetrackState &, const RacetrackMove &) const
bool Legal(const RacetrackState &node1, RacetrackMove &act) const
void GetCarCoordinates(const RacetrackState &s, Graphics::point ¢er, Graphics::point &p1, Graphics::point &p2, Graphics::point &p3) const
int GetIndex(int x, int y) const
bool operator==(const RacetrackState &l1, const RacetrackState &l2)
void DrawLine(Graphics::Display &display, const RacetrackState &x, const RacetrackState &y, float width) const
double GCost(const RacetrackState &node, const RacetrackMove &act) const
uint64_t GetStateHash(const RacetrackState &node) const
RacetrackMove(int x=0, int y=0)
double GCost(const RacetrackState &node1, const RacetrackState &node2) const
long GetMapWidth() const
return the width of the map
void Boundaries(RacetrackState &s, RacetrackMove &v) const
bool GoalTest(const RacetrackState &node, const RacetrackState &goal) const
std::vector< int > heuristic
uint64_t GetActionHash(RacetrackMove act) const
void Reset(RacetrackState &s) const
void OpenGLDraw(const RacetrackState &) const
double HCost(const RacetrackState &node1, const RacetrackState &node2) const
Heuristic value between two arbitrary nodes.
void Draw(Graphics::Display &display) const
int GetNumSuccessors(const RacetrackState &stateID) const
void GetSuccessors(const RacetrackState &nodeID, std::vector< RacetrackState > &neighbors) const
bool InvertAction(RacetrackMove &a) const
const tTerrain kStartTerrain
std::ostream & operator<<(std::ostream &out, const RacetrackState &s)
void ApplyAction(RacetrackState &s, RacetrackMove a) const
const tTerrain kEndTerrain
Nodes to be stored within a Graph.
A tile-based representation of the world.
RacetrackMove GetAction(const RacetrackState &s1, RacetrackState &s2) const