From 1d80742d8b75cd1034f6a7e009f0abd0de745110 Mon Sep 17 00:00:00 2001 From: Alejandro Date: Wed, 14 Aug 2024 01:39:01 +0200 Subject: [PATCH] Fixed merge balls above the line --- lib/game.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/game.js b/lib/game.js index 24c1e3d..7c54bc4 100644 --- a/lib/game.js +++ b/lib/game.js @@ -198,7 +198,7 @@ const game = (getBallLevel, sleepFunction, gameBoard) => { map[d.x >= 6 ? 6 : d.x + 1][d.y], map[d.x <= 0 ? 0 : d.x - 1][d.y], map[d.x][d.y >= 6 ? 6 : d.y + 1], - map[d.x][d.y <= -1 ? -1 : d.y - 1] + map[d.x][d.y <= -2 ? -2 : d.y - 1] ] .filter(n => n && n.type === d.type && n.key !== d .key) .reduce((l, d) => l.concat(checkTile(d)), [d])