tweak puzzle disabler script
This commit is contained in:
parent
746fbbb788
commit
5e8c4d1fd5
|
@ -3,7 +3,7 @@ var count = 0;
|
||||||
puzzles.find().forEach(function(p) {
|
puzzles.find().forEach(function(p) {
|
||||||
var parts = p.fen.split(/\s/);
|
var parts = p.fen.split(/\s/);
|
||||||
var pieceCount = parts[0].split(/[nbrqkp]/i).length - 1;
|
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++;
|
count++;
|
||||||
puzzles.update({
|
puzzles.update({
|
||||||
_id: p._id
|
_id: p._id
|
||||||
|
|
Loading…
Reference in a new issue