+
+ // Stop at the first move found
+ atLeastOneMove(color)
+ {
+ const oppCol = this.getOppCol(color);
+ let [sizeX,sizeY] = VariantRules.size;
+ for (var i=0; i<sizeX; i++)
+ {
+ for (var j=0; j<sizeY; j++)
+ {
+ if (this.board[i][j] != VariantRules.EMPTY && this.getColor(i,j) != oppCol)
+ {
+ const moves = this.getPotentialMovesFrom([i,j]);
+ if (moves.length > 0)
+ {
+ for (let i=0; i<moves.length; i++)
+ {
+ if (this.filterValid([moves[i]]).length > 0)
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }