diff --git a/packages/core/package.json b/packages/core/package.json index 5889b10..82b5fd7 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -22,6 +22,6 @@ }, "dependencies": { "immutable": "^3.8.2", - "preserves": "^0.0.3" + "preserves": "^0.0.4" } } diff --git a/packages/driver-timer/src/index.js b/packages/driver-timer/src/index.js index 3a5e3bd..50f53be 100644 --- a/packages/driver-timer/src/index.js +++ b/packages/driver-timer/src/index.js @@ -16,7 +16,7 @@ // along with this program. If not, see . //--------------------------------------------------------------------------- -import { Observe, Dataspace } from "@syndicate-lang/core"; +import { Observe, Dataspace, Float } from "@syndicate-lang/core"; export { PeriodicTick, TimeLaterThan }; @@ -38,7 +38,7 @@ spawn named 'driver-timer/PeriodicTick' { on start { handle = setInterval(Dataspace.wrapExternal(() => { ^ PeriodicTick(intervalMS); - }), intervalMS); + }), Float.unwrap(intervalMS)); } on stop { if (handle) { @@ -58,7 +58,7 @@ spawn named 'driver-timer/TimeLaterThan' { let handle = null; let finish = Dataspace.backgroundTask(); on start { - let delta = deadlineMS - (+(new Date())); + let delta = Float.unwrap(deadlineMS) - (+(new Date())); handle = setTimeout(Dataspace.wrapExternal(() => { handle = null; finish(); diff --git a/packages/flappy-bird-demo/src/index.js b/packages/flappy-bird-demo/src/index.js index 10c291d..2c15fd8 100644 --- a/packages/flappy-bird-demo/src/index.js +++ b/packages/flappy-bird-demo/src/index.js @@ -17,7 +17,7 @@ // along with this program. If not, see . //--------------------------------------------------------------------------- -import { $QuitDataspace, Inbound, Outbound, Dataspace } from "@syndicate-lang/core"; +import { $QuitDataspace, Inbound, Outbound, Dataspace, Double } from "@syndicate-lang/core"; let UI = activate require("@syndicate-lang/driver-browser-ui"); // @jsx UI.html @@ -85,7 +85,7 @@ function spawnGame() { field this.ypos = 312; field this.yvel = 0; - assert Position(this.xpos, this.ypos); + assert Position(Double(this.xpos), Double(this.ypos)); assert Outbound(ui.html('#board-area',
, 0)); @@ -148,10 +148,10 @@ function spawnGame() { } field this.xpos = xlocation; - on asserted Position($xpos, _) this.xpos = xlocation - xpos; + on asserted Position($xpos, _) this.xpos = xlocation - xpos.value; on asserted Position($xpos, $ypos) { - if (touchingPillar(xpos, ypos)) { + if (touchingPillar(xpos.value, ypos.value)) { react { assert GameOver(); }