From 826e3d959d2339af285cc3417315efe16a8ff07d Mon Sep 17 00:00:00 2001 From: brian cully Date: Wed, 24 Dec 2025 11:55:01 -0500 Subject: part 2: move core logic to game module, which owns robos --- site/arena.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'site/arena.mjs') diff --git a/site/arena.mjs b/site/arena.mjs index c76f7dc..83f0f05 100644 --- a/site/arena.mjs +++ b/site/arena.mjs @@ -30,10 +30,10 @@ export default class extends HTMLElement { return [xx, yy]; } - randStart(robo) { + randStart() { const [x, y] = [this.#canvas.width, this.#canvas.height].map(len => this.constructor.radius + Math.floor(Math.random() * (len - 2*this.constructor.radius))); - return {...robo, x, y}; + return {x, y}; } renderFPS(now) { -- cgit v1.3