Safe Haskell | None |
---|---|
Language | Haskell2010 |
Two phase algorithm to solve a Rubik's cube
- phase1Proj :: Projection Cube (MoveTag m [RawMove CornerOrien], MoveTag m1 [RawMove EdgeOrien], MoveTag m2 [RawMove UDSlice]) (RawMove CornerOrien, RawMove EdgeOrien, RawMove UDSlice) (RawCoord CornerOrien, RawCoord EdgeOrien, RawCoord UDSlice)
- phase1Convert :: Cube -> (RawCoord CornerOrien, RawCoord EdgeOrien, RawCoord UDSlice)
- phase1Dist :: Distance m (RawCoord CornerOrien, RawCoord EdgeOrien, RawCoord UDSlice)
- phase1 :: Cube -> Move
- phase1Solved :: Cube -> Bool
- phase2Proj :: Projection Cube (MoveTag m [RawMove CornerPermu], MoveTag m1 [RawMove UDEdgePermu2], MoveTag m2 [RawMove UDSlicePermu2]) (RawMove CornerPermu, RawMove UDEdgePermu2, RawMove UDSlicePermu2) (RawCoord CornerPermu, RawCoord UDEdgePermu2, RawCoord UDSlicePermu2)
- phase2Convert :: Cube -> (RawCoord CornerPermu, RawCoord UDEdgePermu2, RawCoord UDSlicePermu2)
- phase2Dist :: Distance m (RawCoord CornerPermu, RawCoord UDEdgePermu2, RawCoord UDSlicePermu2)
- phase2 :: Cube -> Move
- phase2Solved :: Cube -> Bool
- solve :: Cube -> Move
Documentation
phase1Proj :: Projection Cube (MoveTag m [RawMove CornerOrien], MoveTag m1 [RawMove EdgeOrien], MoveTag m2 [RawMove UDSlice]) (RawMove CornerOrien, RawMove EdgeOrien, RawMove UDSlice) (RawCoord CornerOrien, RawCoord EdgeOrien, RawCoord UDSlice) Source
phase1Solved :: Cube -> Bool Source
phase1Solved (phase1 c)
phase2Proj :: Projection Cube (MoveTag m [RawMove CornerPermu], MoveTag m1 [RawMove UDEdgePermu2], MoveTag m2 [RawMove UDSlicePermu2]) (RawMove CornerPermu, RawMove UDEdgePermu2, RawMove UDSlicePermu2) (RawCoord CornerPermu, RawCoord UDEdgePermu2, RawCoord UDSlicePermu2) Source
phase2Convert :: Cube -> (RawCoord CornerPermu, RawCoord UDEdgePermu2, RawCoord UDSlicePermu2) Source
phase2Dist :: Distance m (RawCoord CornerPermu, RawCoord UDEdgePermu2, RawCoord UDSlicePermu2) Source
phase2Solved :: Cube -> Bool Source
phase1Solved c ==> phase2Solved (phase2 c)