From d8681b2d40274902659bc3ef0193e33f813d44d7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Mar 2026 18:24:45 +0000 Subject: [PATCH 1/2] Initial plan From d19bbade9986ac06e86f1c954e0e9872ccc125ca Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Mar 2026 18:27:40 +0000 Subject: [PATCH 2/2] Fix timer ordering in submitSelection, update JSDoc for init and createGameCard Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com> Agent-Logs-Url: https://github.com/acrosman/BrainSpeedExercises/sessions/c59600aa-4016-4483-8135-bbf8b78db514 --- app/components/gameCard.js | 5 +++++ app/games/orbit-sprite-memory/index.js | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/components/gameCard.js b/app/components/gameCard.js index e268297..3808c08 100644 --- a/app/components/gameCard.js +++ b/app/components/gameCard.js @@ -16,6 +16,11 @@ * @param {string} [manifest.thumbnail] - Path to the thumbnail image. * @param {object} [progress] - Optional progress data for the game. * @param {number} [progress.highScore] - The player's high score for this game. + * @param {number} [progress.highestLevel] - The highest level reached (0-indexed; + * displayed as level + 1). + * @param {number} [progress.maxLevel] - The maximum level number reached. + * @param {number} [progress.maxPiggies] - The maximum number of piggies collected. + * @param {number} [progress.lowestDisplayTime] - The lowest display time achieved, in milliseconds. * @returns {HTMLElement} An
element representing the game card. */ export function createGameCard(manifest, progress) { diff --git a/app/games/orbit-sprite-memory/index.js b/app/games/orbit-sprite-memory/index.js index 813d973..f510fb3 100644 --- a/app/games/orbit-sprite-memory/index.js +++ b/app/games/orbit-sprite-memory/index.js @@ -463,9 +463,9 @@ export function submitSelection() { announce('Incorrect. Reviewing positions before the next round.'); } + clearTimers(); showRoundReveal(_currentRound); - clearTimers(); _timers.push(setTimeout(() => { clearRevealSprites(); _timers.push(setTimeout(() => { @@ -501,7 +501,7 @@ const name = 'Orbit Sprite Memory'; /** * Initializes the plugin and wires UI events. * - * @param {HTMLElement} gameContainer - Injected game container. + * @param {HTMLElement|null} gameContainer - Injected game container. */ function init(gameContainer) { _container = gameContainer;