-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rubik cube excercise #987
Comments
`{-# OPTIONS_HADDOCK prune, ignore-exports #-} {------------------------------------------------------------------------------} module Rubik where import qualified Data.Set as Set data Color = Blue data RDirection = ClockWise data Plain = Horizontal data RubikCube = RC type Vector a = [a] type Matrix a = [Vector a] getWidth :: Matrix a -> Int getHeight :: Matrix a -> Int getSize :: Matrix a -> (Int, Int) getVectorElement :: Vector a -> Int -> a setVectorElement :: Vector a -> Int -> a -> Vector a getElement :: Matrix a -> Int -> Int -> a setElement :: Matrix a -> Int -> Int -> a -> Matrix a getRow :: Matrix a -> Int -> Vector a setRow :: Matrix a -> Int -> Vector a -> Matrix a getColumn :: Matrix a -> Int -> Vector a setColumn :: Matrix a -> Int -> Vector a -> Matrix a rotateMatrix :: Matrix a -> RDirection -> Matrix a rotateRubik :: RubikCube -> RDirection -> Plain -> Int -> RubikCube against :: RDirection -> RDirection neighbours :: ((RDirection, Plain, Int), RubikCube) goal :: ((RDirection, Plain, Int), RubikCube) -> Bool cube :: Int -> ((RDirection, Plain, Int), RubikCube) main :: Int -> IO () {-[ Module ends ]-------------------------------------------------------------}` |
Hey Team! I would like to have an exercise for solving Rubik's cube (2x2x2 to 5x5x5 but it' can be unlimited) please (see attached)! I waited days but the program is busy calculating (even for 2x2x2)... There is a room to improve. Thank you in advance (for enhancement), have a nice one!
The text was updated successfully, but these errors were encountered: