Go to the documentation of this file.
123 bool Valid(
int x,
int y)
const;
143 std::array<HexagonAction, 12>
state;
156 for (
int x = 0; x < l1.
cnt; x++)
159 for (
int y = 0; y < l1.
cnt; y++)
181 void SetFlippable(
const std::array<tFlipType, numPieces> &flips);
222 void IndexToXY(
int index,
int &x,
int &y)
const;
225 bool Valid(
int x,
int y)
const;
void Draw(Graphics::Display &display) const
void RotateCW(HexagonState &s) const
void GetNextState(const HexagonSearchState &, HexagonAction, HexagonSearchState &) const
void GenerateBoardBorder()
Prints out the outer coorsinates of the board.
std::vector< int > pieces
bool InvertAction(HexagonAction &a) const
void DrawSetup(Graphics::Display &display) const
Draws available pieces and constraints.
double HCost(const HexagonSearchState &node1, const HexagonSearchState &node2) const
Heuristic value between two arbitrary nodes.
void GetSuccessors(const HexagonState &nodeID, std::vector< HexagonState > &neighbors) const
std::vector< int > touchPieces
bool GetBorder(int x, int y, int xoff, int yoff, Graphics::point &p1, Graphics::point &p2) const
double GCost(const HexagonState &node1, const HexagonState &node2) const
bool Valid(int x, int y) const
std::vector< rgbColor > pieceColors
HexagonAction GetAction(const HexagonSearchState &s1, const HexagonSearchState &s2) const
void ApplyAction(HexagonState &s, HexagonAction a) const
bool GetBorder(int x, int y, int xoff, int yoff, Graphics::point &p1, Graphics::point &p2) const
void GetCorners(int x, int y, Graphics::point &p1, Graphics::point &p2, Graphics::point &p3) const
uint64_t GetStateHash(const HexagonSearchState &node) const
uint64_t GetActionHash(HexagonAction act) const
bool GoalTest(const HexagonSearchState &node) const
Goal Test if the goal is stored.
void GetCorners(int x, int y, Graphics::point &p1, Graphics::point &p2, Graphics::point &p3) const
void Flip(HexagonSearchState &s) const
void RotateCW(HexagonSearchState &s) const
bool GoalTest(const HexagonState &node, const HexagonState &goal) const
friend HexagonEnvironment
void GetActions(const HexagonSearchState &nodeID, std::vector< HexagonAction > &actions) const
void SetFlippable(const std::array< tFlipType, numPieces > &flips)
double GCost(const HexagonState &node, const HexagonAction &act) const
bool InvertAction(HexagonAction &a) const
static std::ostream & operator<<(std::ostream &out, const HexagonAction &a)
double GCost(const HexagonSearchState &node1, const HexagonSearchState &node2) const
void BuildRotationTable()
void Draw(Graphics::Display &display) const
void DrawSetup(Graphics::Display &display) const
Draws available pieces and constraints.
std::vector< rgbColor > pieceColors
void SetPieces(const std::vector< tPieceName > &pieces)
void ApplyAction(HexagonSearchState &s, HexagonAction a) const
void LoadSolution(const char *, HexagonState &s)
void Load(const char *, HexagonState &s, bool solution)
bool GoalTest(const HexagonState &node) const
Goal Test if the goal is stored.
std::array< HexagonAction, 12 > state
int flipMap[numPieces][14 *6 *2+1]
std::vector< int > noFlipPieces
void UndoAction(HexagonSearchState &s, HexagonAction a) const
void IndexToXY(int index, int &x, int &y) const
const std::string pieceNames[numPieces]
bool Valid(int x, int y) const
std::array< tFlipType, numPieces > flippable
HexagonAction GetAction(const HexagonState &s1, const HexagonState &s2) const
void GetNextState(const HexagonState &, HexagonAction, HexagonState &) const
std::vector< int > diagPieces
void GetSuccessors(const HexagonSearchState &nodeID, std::vector< HexagonSearchState > &neighbors) const
double GCost(const HexagonSearchState &node, const HexagonAction &act) const
double HCost(const HexagonState &node1, const HexagonState &node2) const
Heuristic value between two arbitrary nodes.
uint64_t GetStateHash(const HexagonState &node) const
static bool operator==(const HexagonState &l1, const HexagonState &l2)
bool GoalTest(const HexagonSearchState &node, const HexagonSearchState &goal) const
uint64_t GetActionHash(HexagonAction act) const
void LoadPuzzle(const char *, HexagonState &s)
std::vector< int > notTouchPieces
void GetActions(const HexagonState &nodeID, std::vector< HexagonAction > &actions) const
int rotate30Map[numPieces][14 *6 *2+1]
Nodes to be stored within a Graph.
void GeneratePieceCoordinates(tPieceName p)
Prints out the triangles used for this piece in HOG2 coordinates.