fable/val Public Public: anyone can read this; nobody can change it.

forked from benjivers/val

workbenchthis machine
Files 984794ed22fb89fd183fee6ad0e3c1184486a759
1
/**
2
 * This map, bound to the engine's grid: the rows are the game's, the maths is
3
 * shared with the browser, and the binding has to hand one to the other.
4
 */
5
6
import { expect, test } from "bun:test";
7
import { BODY_R } from "./engine/glide.ts";
8
import { moveCircle } from "./map.ts";
9
10
test("the real map moves by the same maths", () => {
11
  // Mid, walking east into whatever is there: the map's own binding.
12
  const to = moveCircle(1200, 640, 9, 0, BODY_R);
13
  expect(to.x).toBeGreaterThanOrEqual(1200);
14
  expect(to.x).toBeLessThanOrEqual(1209);
15
  expect(to.y).toBe(640);
16
});
↑↓ navigate ↵ open esc close
↑↓ navigate ↵ open esc close

Keyboard shortcuts