X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=code%2FSokoban.dcl;h=f50328733a25bbd17fc72676072d349695bd17f4;hb=528cda8a5116dbed02a1e603d7fca2033dd0c100;hp=32b5e110fee9a4498fbaa6e1be9a302e81f83c4b;hpb=1df8158b127c3888d1ab10db0e6c05da2c795e1c;p=mc1516pa.git diff --git a/code/Sokoban.dcl b/code/Sokoban.dcl index 32b5e11..f503287 100644 --- a/code/Sokoban.dcl +++ b/code/Sokoban.dcl @@ -1,9 +1,14 @@ definition module Sokoban -:: SokobanPuzzle = { - width :: Int, - height :: Int, - data :: [[SokobanTile]]} -:: SokobanTile = Wall | Free | Box | Target | Agent +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