diff --git a/AlgebraicDataflowArchitectureModel/models/JumpGame.model b/AlgebraicDataflowArchitectureModel/models/JumpGame.model index 7fe18c8..4db5282 100644 --- a/AlgebraicDataflowArchitectureModel/models/JumpGame.model +++ b/AlgebraicDataflowArchitectureModel/models/JumpGame.model @@ -3,8 +3,8 @@ out time(t:Double, gravity(y)) == t + 0.01 } channel CIO2 { - out move(v:Tuple, moveX(x:Double)) == tuple(x, snd(v)) - out move(v, moveY(y:Double)) == tuple(fst(v), y) + out move(v:Tuple, moveX(x:Double)) == tuple(x, snd(v)) + out move(v, moveY(y:Double)) == tuple(fst(v), y) } channel CIO3 { out mass(m:Double, setMass(x:Double)) == x @@ -32,9 +32,9 @@ out velocity(v:Tuple, update4(m2, o)) == if(and(o, ge(snd(m2), 0.0)), m2, v) } channel C4 { - in velocity(v, update5(v2, g2)) == v2 - ref ground(g, update5(v2, g2)) - out position(p:Tuple, update5(v2, g2)) == if(and(eq(g2, true), lt(snd(p) + 0.01 * snd(v2), 0.0)), + in velocity(v, update5(v2, g)) == v2 + ref ground(g, update5(v2, g)) + out position(p:Tuple, update5(v2, g)) == if(and(eq(g, true), lt(snd(p) + 0.01 * snd(v2), 0.0)), tuple(fst(p) + 0.01 * fst(v2), 0.0), tuple(fst(p) + 0.01 * fst(v2), snd(p) + 0.01 * snd(v2))) } @@ -46,5 +46,5 @@ channel C6 { in position(p, update6(p2)) == p2 out clear(c:Bool, update6(p2)) == if(gt(fst(p2), 100.0), true, false) - out gameover(g:Bool, update6(p2)) == if(lt(snd(p2), -1.0), true, false) + out gameover(go:Bool, update6(p2)) == if(lt(snd(p2), -1.0), true, false) } \ No newline at end of file