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
This commit is contained in:
synth-ruiner 2015-03-01 17:24:19 +00:00
parent 7af5e99f0a
commit 830503cfe5
1 changed files with 7 additions and 1 deletions

View File

@ -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() {