From 4211e0aeed639a9eb14488d456cd95bdffc16118 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Fri, 11 Mar 2016 11:49:58 +0100 Subject: [PATCH] added stub for boxonbox thing --- code/SokobanObjectwise.icl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/SokobanObjectwise.icl b/code/SokobanObjectwise.icl index d51ee55..9dc09a1 100644 --- a/code/SokobanObjectwise.icl +++ b/code/SokobanObjectwise.icl @@ -56,6 +56,7 @@ encode p = join "\n" [ "INVAR (" <+ encodeGoalState (indexList boxes) targetPos <+ ") <-> movement = finished;", "INVAR " <+ encodeAgentNotOnBox (indexList boxes) <+ ";", + "INVAR " <+ encodeBoxesNotOnBox (indexList boxes), "TRANS next(agent.x) = agent.x + dx;", "TRANS next(agent.y) = agent.y + dy;", encodeBlockMovement (indexList boxes), @@ -120,6 +121,10 @@ encodeBlockMovement bs = join "\n" $ map ebm bs "\t\tTRUE: b" <+ i <+ ".y + dy;\n" <+ "\tesac;" +//TODO +encodeBoxesNotOnBox :: [Int] -> String +encodeBoxesNotOnBox _ = "TRUE;" + encodeAgentNotOnBox :: [Int] -> String encodeAgentNotOnBox bs = join " &\n\t" [ "(b" <+ i <+ ".x != agent.x & b" <+ i <+ ".y != agent.y)"\\i<-bs] -- 2.20.1