From 9828d060e2b3bb8504f96803e9ac363d2a3c2573 Mon Sep 17 00:00:00 2001 From: Steven Joseph Lussier <146765702+stevenlussier1@users.noreply.github.com> Date: Thu, 16 Nov 2023 10:14:33 -0500 Subject: [PATCH] Update main.js --- js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index 6930208..6468907 100644 --- a/js/main.js +++ b/js/main.js @@ -50,7 +50,7 @@ boardEl.addEventListener('click', function(e) { var col = parseInt(clickedEl.dataset.col); var cell = board[row][col]; if (e.shiftKey && !cell.revealed && bombCount > 0) { - bombCount += cell.flag() ? -1 : 1; + bombCount += cell.flag() ? 0 : 1; } else { hitBomb = cell.reveal(); if (hitBomb) { @@ -233,4 +233,4 @@ function runCodeForAllCells(cb) { } init(); -render(); \ No newline at end of file +render();