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
631cf7d
..
f503287
100644
(file)
--- a/
code/Sokoban.dcl
+++ b/
code/Sokoban.dcl
@@
-3,9
+3,12
@@
definition module Sokoban
from StdString import class toString
:: SokobanPuzzle = Sokoban [[SokobanTile]]
from StdString import class toString
:: SokobanPuzzle = Sokoban [[SokobanTile]]
-:: SokobanTile =
Wall | Free | Box | Target | Agent
+:: SokobanTile =
Free | Wall | Box | Target | Agent | TargetAgent | TargetBox
instance toString SokobanTile
instance toString SokobanPuzzle
parse :: String *World -> (SokobanPuzzle, *World)
instance toString SokobanTile
instance toString SokobanPuzzle
parse :: String *World -> (SokobanPuzzle, *World)
+parseFromFile :: *File -> (SokobanPuzzle, *File)
+
+numberOfBlocks :: SokobanPuzzle -> Int