Minor refactoring
parent
84734e4113
commit
286ab00490
|
@ -1,3 +1,4 @@
|
|||
module SlidingPuzzle where
|
||||
-- Solves the sliding puzzle problem (http://en.wikipedia.org/wiki/Sliding_puzzle)
|
||||
-- using A* algorithm
|
||||
|
||||
|
@ -88,6 +89,7 @@ type Point = (Int, Int)
|
|||
|
||||
-- A sliding puzzle
|
||||
-- blank : which item is considered blank
|
||||
-- blankPos : position of blank
|
||||
-- pzState : the current state of the puzzle
|
||||
data Puzzle a = Puzzle { blank :: a, blankPos :: Point, pzState :: Array Point a }
|
||||
deriving (Eq, Ord)
|
||||
|
|
Loading…
Reference in New Issue