tweak puzzle disabler script

puzzle2
Thibault Duplessis 2016-09-30 12:32:40 +02:00
parent 746fbbb788
commit 5e8c4d1fd5
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ var count = 0;
puzzles.find().forEach(function(p) {
var parts = p.fen.split(/\s/);
var pieceCount = parts[0].split(/[nbrqkp]/i).length - 1;
if (pieceCount < 9 && p.vote.sum < 50) {
if (pieceCount < 9 && p.vote.sum < 50 && p.vote.sum > -1000) {
count++;
puzzles.update({
_id: p._id