Portability | portable |
---|---|
Stability | provisional |
Maintainer | echbar137@yahoo.co.in |
Safe Haskell | Safe |
Exposes virtual cube functionality.
- data Rubik = Rubik {}
- data Cube = Cube {}
- posToId :: Size -> Vec -> Numb
- getPos :: Size -> Numb -> Vec
- consCubeInfo :: Int -> CubeSurf -> [(Int, ActualCube, ColorTag)]
- solvedSurf :: Int -> CubeSurf
- cubeIdsOfFace :: Int -> Side -> [Int]
- cubeTypes :: Size -> ([Int], [Int], [Int], [Int])
- initCube :: Size -> Rubik
- getFaceColor :: Rubik -> (Numb, Side) -> String
- getCubeFromPos :: Rubik -> Numb -> Cube
- doCubeOps :: [Rotation] -> Rubik -> Rubik
- loadCube :: Size -> FilePath -> IO Rubik
- saveCube :: FilePath -> Rubik -> IO ()
Documentation
Vitrual Rubik's cube.
Individual cube of Rubik's cube, known as a Cubie.
consCubeInfo :: Int -> CubeSurf -> [(Int, ActualCube, ColorTag)]Source
Converts from a surface view of cube to a cubie view of cube.
solvedSurf :: Int -> CubeSurfSource
CubeSurf representing a solved cube.
cubeIdsOfFace :: Int -> Side -> [Int]Source
Maps a face id defined with respect to a side, to the cube id.
cubeTypes :: Size -> ([Int], [Int], [Int], [Int])Source
Generates a tuple of cube ids corresponding to (corners, edges, centers, hidden cubies).
getFaceColor :: Rubik -> (Numb, Side) -> StringSource
Color of cube id on a face is returned. This function is important for rendering.
getCubeFromPos :: Rubik -> Numb -> CubeSource
Returns the cubie at a given position.