started with some necoding
[mc1516pa.git] / code / Sokoban.dcl
index 30e9465..f503287 100644 (file)
@@ -1,9 +1,14 @@
 definition module Sokoban
 
-:: SokobanPuzzle = {
-       width :: Int,
-       height :: Int,
-       data :: [[SokobanTile]]}
-:: SokobanTile = Wall | Free | Box | Target
+from StdString import class toString
+
+:: SokobanPuzzle = Sokoban [[SokobanTile]]
+:: SokobanTile = Free | Wall | Box | Target | Agent | TargetAgent | TargetBox
+
+instance toString SokobanTile
+instance toString SokobanPuzzle
 
 parse :: String *World -> (SokobanPuzzle, *World)
+parseFromFile :: *File -> (SokobanPuzzle, *File)
+
+numberOfBlocks :: SokobanPuzzle -> Int