diff options
| author | brian cully <bjc@spork.org> | 2025-12-24 11:55:01 -0500 |
|---|---|---|
| committer | brian cully <bjc@spork.org> | 2025-12-24 11:55:01 -0500 |
| commit | 826e3d959d2339af285cc3417315efe16a8ff07d (patch) | |
| tree | 5409c0d823b81ae0a4349090d9380615cbded830 /site/arena.mjs | |
| parent | fdd715f4e610ae68dcb5310c37cebfbf383b1a4c (diff) | |
| download | automathon-826e3d959d2339af285cc3417315efe16a8ff07d.tar.gz automathon-826e3d959d2339af285cc3417315efe16a8ff07d.zip | |
part 2: move core logic to game module, which owns robos
Diffstat (limited to 'site/arena.mjs')
| -rw-r--r-- | site/arena.mjs | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |
