From fdbcda37ab001c47d853f08d9f5baafe36bee24f Mon Sep 17 00:00:00 2001 From: Thomas David Baker Date: Mon, 3 Jan 2022 13:18:34 +0000 Subject: [PATCH] Fix typo Although fixing this has no effect on behavior meaning this code is never being exercised so it's probably buggy. --- players/cautiousplayer.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/players/cautiousplayer.php b/players/cautiousplayer.php index e7c8f2e..1d32204 100644 --- a/players/cautiousplayer.php +++ b/players/cautiousplayer.php @@ -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; } }