Go to the documentation of this file.
9 #ifndef __hog2_glut__Rubik7Edge__
10 #define __hog2_glut__Rubik7Edge__
29 for (
int x = 0; x < 12; x++)
35 return (
state>>(12+4*whichLoc))&0xF;
40 uint64_t value = cube&0xF;
42 state |= (value<<(12+4*whichLoc));
46 return state&(0x1<<whichCube);
52 state |= (0x1<<whichCube);
69 for (
int x = 0; x < 12; x++)
85 for (
int x = 0; x < 12; x++)
107 for (
int x = 0; x < 18; x++)
172 void MRUnrank(
int n, uint64_t r, uint64_t &perm)
const;
173 void MRUnrank2(
int n, uint64_t r, uint64_t &perm)
const;
Rubik7EdgeMove * getMoves(Rubik7EdgeState &)
void FlipCubeOrientation(int whichCube)
int64_t getMaxSinglePlayerRank() const
virtual bool InvertAction(Rubik7EdgeAction &a) const
void SetCubeOrientation(int whichCube, bool flip)
virtual void GetActions(const Rubik7EdgeState &nodeID, std::vector< Rubik7EdgeAction > &actions) const
virtual bool GoalTest(const Rubik7EdgeState &node, const Rubik7EdgeState &goal) const
virtual double GCost(const Rubik7EdgeState &node1, const Rubik7EdgeState &node2) const
void SetCubeInLoc(int whichLoc, int cube)
virtual void OpenGLDraw() const
void rankPlayerFirstTwo(const Rubik7EdgeState &s, int who, int64_t &rank)
void unrankPlayer(uint64_t d, Rubik7EdgeState &s, int who)
virtual void GetNextState(const Rubik7EdgeState &, Rubik7EdgeAction, Rubik7EdgeState &) const
void MRUnrank2(int n, uint64_t r, uint64_t &perm) const
virtual double GCost(const Rubik7EdgeState &node, const Rubik7EdgeAction &act) const
virtual void GetStateFromHash(uint64_t hash, Rubik7EdgeState &node) const
virtual void ApplyAction(Rubik7EdgeState &s, Rubik7EdgeAction a) const
virtual uint64_t GetActionHash(Rubik7EdgeAction act) const
virtual uint64_t GetStateHash(const Rubik7EdgeState &node) const
int64_t rankPlayer(Rubik7EdgeState &s, int who)
static std::ostream & operator<<(std::ostream &out, const Rubik7EdgeState &s)
void ApplyMove(Rubik7EdgeState &s, Rubik7EdgeMove *a)
int64_t getMaxSinglePlayerRank2()
int GetCubeInLoc(int whichLoc) const
void rankPlayerRemaining(const Rubik7EdgeState &s, int who, int64_t &rank)
void UndoMove(Rubik7EdgeState &s, Rubik7EdgeMove *a)
void SetCubeColor(int which, bool face, const Rubik7EdgeState &) const
virtual void GetSuccessors(const Rubik7EdgeState &nodeID, std::vector< Rubik7EdgeState > &neighbors) const
void GetDual(Rubik7EdgeState &s) const
void MRUnrank(int n, uint64_t r, uint64_t &perm) const
virtual double HCost(const Rubik7EdgeState &node1, const Rubik7EdgeState &node2) const
Heuristic value between two arbitrary nodes.
virtual Rubik7EdgeAction GetAction(const Rubik7EdgeState &s1, const Rubik7EdgeState &s2) const
void rankPlayer(const Rubik7EdgeState &s, int who, int64_t &index1, int64_t &index2)
bool GetCubeOrientation(int whichCube) const
static bool operator==(const Rubik7EdgeState &l1, const Rubik7EdgeState &l2)
void freeMove(Rubik7EdgeMove *m)
Nodes to be stored within a Graph.