repositories
/
mc1516pa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
started with some necoding
[mc1516pa.git]
/
code
/
Sokoban.dcl
diff --git
a/code/Sokoban.dcl
b/code/Sokoban.dcl
index
30e9465
..
f503287
100644
(file)
--- a/
code/Sokoban.dcl
+++ b/
code/Sokoban.dcl
@@
-1,9
+1,14
@@
definition module Sokoban
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)
parse :: String *World -> (SokobanPuzzle, *World)
+parseFromFile :: *File -> (SokobanPuzzle, *File)
+
+numberOfBlocks :: SokobanPuzzle -> Int