Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
Although fixing this has no effect on behavior meaning this code is never being exercised so it's probably buggy.
  • Loading branch information
bakert committed Jan 3, 2022
1 parent 369dd8b commit fdbcda3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions players/cautiousplayer.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ private function enablesQwirkle(Move $move, Board $board) {
return false;
}

// BAKERT It's possible that this doesn't work as it never seems to return true.
private function enablesDoubleQwirkle(Move $move, Board $board) {
foreach ($move->lines($board) as $line) {
if ($line->length() === count(Color::colors()) - 2) {
$missingPieces = $this->missingPieces($line);
if ($this->notAccountedFor($missingPiece[0], $board)
&& $this->notAccountedFor($missingPiece[1], $board)) {
if ($this->notAccountedFor($missingPieces[0], $board)
&& $this->notAccountedFor($missingPieces[1], $board)) {
return true;
}
}
Expand Down

0 comments on commit fdbcda3

Please sign in to comment.