Skip to content

Commit

Permalink
Update 51_node.js
Browse files Browse the repository at this point in the history
  • Loading branch information
fohristiwhirl committed May 22, 2020
1 parent 4a72edd commit 3b34c41
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/51_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ const node_prototype = {

is_triple_rep: function() {

// Are there enough ancestors since the last pawn move or capture?

if (this.board.halfmove < 8) {
return false;
}
Expand All @@ -188,6 +190,9 @@ const node_prototype = {
return true;
}
}

// All further ancestors are the wrong side of a pawn move or capture?

if (ancestor.board.halfmove < 2) {
return false;
}
Expand Down

0 comments on commit 3b34c41

Please sign in to comment.