From 830503cfe518e5a2ef3c7e884d3a789de8bde4db Mon Sep 17 00:00:00 2001 From: synth-ruiner Date: Sun, 1 Mar 2015 17:24:19 +0000 Subject: [PATCH] Fixed flag mine count exploit Player could check if a tile was a mine by flagging a tile and seeing if the remaining mine count changes or not --- index.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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() {