/** * This map, bound to the engine's grid: the rows are the game's, the maths is * shared with the browser, and the binding has to hand one to the other. */ import { expect, test } from "bun:test"; import { BODY_R } from "./engine/glide.ts"; import { moveCircle } from "./map.ts"; test("the real map moves by the same maths", () => { // Mid, walking east into whatever is there: the map's own binding. const to = moveCircle(1200, 640, 9, 0, BODY_R); expect(to.x).toBeGreaterThanOrEqual(1200); expect(to.x).toBeLessThanOrEqual(1209); expect(to.y).toBe(640); });