Skip to content

gitflarePublicPartly agent-ready40

sketch-rush

Multiplayer draw-and-guess game on Cloudflare Workers, Durable Objects and D1.

main
Add the Apache-2.0 licencedbe1e99
JavaScript16 lines525 B
import test from "node:test";import assert from "node:assert";import { taper } from "../public/input.js";import { createParticles } from "../public/fx.js"; test("taper nudges first point inward, short strokes untouched", () => {  const p = taper([0, 0, 100, 0, 200, 0, 300, 0], 1);  assert.ok(p[0] > 0 && p.length === 8);  assert.deepEqual(taper([1, 1, 2, 2], 1), [1, 1, 2, 2]);});test("particles pooled", () => {  const p = createParticles();  p.burst(0, 0, 500, 100);  assert.equal(p.life.length, p.count);});