Skip to content
Snippets Groups Projects
Commit 6ed93f74 authored by Michael Leuschel's avatar Michael Leuschel
Browse files

add VISB_JSON_FILE definition

parent b09581dc
No related branches found
No related tags found
No related merge requests found
...@@ -8,16 +8,8 @@ Input: one 3 gallon and one 5 gallon jug, and we need to measure precisely 4 gal ...@@ -8,16 +8,8 @@ Input: one 3 gallon and one 5 gallon jug, and we need to measure precisely 4 gal
DEFINITIONS DEFINITIONS
GOAL == (4:ran(level)); GOAL == (4:ran(level));
gmax == max(ran(maxf)); gmax == max(ran(maxf));
ANIMATION_FUNCTION_DEFAULT == {r,c,i | c:Jars & r:1..gmax & i=3};
ri == (gmax+1-r); ri == (gmax+1-r);
ANIMATION_FUNCTION == {r,c,i | c:Jars & ri:1..maxf(c) & VISB_JSON_FILE == "jars.json";
(ri<=level(c) => i=1 ) & (ri>level(c) => i=2)};
ANIMATION_RIGHT_CLICK(J,Fill) ==
ANY J2,Amount WHERE J2:Jars & Amount:1..gmax THEN
CHOICE EmptyJar({1|->j3,2|->j5}(J)) OR FillJar({1|->j3,2|->j5}(J)) OR
Transfer(J2,Amount,{1|->j3,2|->j5}(J))
END
END;
SETS SETS
Jars = {j3,j5} Jars = {j3,j5}
CONSTANTS maxf CONSTANTS maxf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment