Web Dev Solutions

Catalin Mititiuc

From 59dfb8d697ebbe499eb00625a91ab2778e3c7534 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Fri, 26 Jul 2024 15:32:47 -0700 Subject: Fix arrangeCounters --- src/modules/gameboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/gameboard.js b/src/modules/gameboard.js index f909d1f..135b5e9 100644 --- a/src/modules/gameboard.js +++ b/src/modules/gameboard.js @@ -434,7 +434,7 @@ export function setCounter(name) { } function arrangeCounters(container) { - const counters = container.querySelectorAll('[class^="counter-"]'); + const counters = [...container.children].filter(isCounter); const length = 12; const gravity = 1; const lateralForce = gravity; -- cgit v1.2.3