diff --git a/index.html b/index.html index 45f3d63..deae344 100644 --- a/index.html +++ b/index.html @@ -253,7 +253,13 @@ } function updateMinesLeft() { - $('#mines').text("Mines left: " + $('.mine:not(.revealed):not(.flagged)').length); + //unflagged mines - revealed mines - flagged not-mines + $('#mines').text( + "Mines left: " + + ($('.mine:not(.flagged)').length + - $('.mine.revealed').length + - $('li:not(.mine).flagged').length) + ); } $.fn.rowScore = function() {