X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=code%2FSokoban.dcl;h=631cf7d911c5ccb7707941d4f50b96c1317253d5;hb=ce272707c750ffd26760802cde66e8da29c246b7;hp=30e9465e163abfc5518b5736db1da3ffbe9ac1db;hpb=9754f5cfb7a38d480ecf72dc87d4c67cd774c9d7;p=mc1516pa.git diff --git a/code/Sokoban.dcl b/code/Sokoban.dcl index 30e9465..631cf7d 100644 --- a/code/Sokoban.dcl +++ b/code/Sokoban.dcl @@ -1,9 +1,11 @@ definition module Sokoban -:: SokobanPuzzle = { - width :: Int, - height :: Int, - data :: [[SokobanTile]]} -:: SokobanTile = Wall | Free | Box | Target +from StdString import class toString + +:: SokobanPuzzle = Sokoban [[SokobanTile]] +:: SokobanTile = Wall | Free | Box | Target | Agent + +instance toString SokobanTile +instance toString SokobanPuzzle parse :: String *World -> (SokobanPuzzle, *World)