Skip to content

Commit

Permalink
Fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Jan 27, 2025
1 parent 206f16d commit d1fd37f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Variant/AbstractPiece.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,11 @@ public function isBetween(AbstractPiece $a, AbstractPiece $b): bool
*/
public function isPinned(): ?AbstractPiece
{
foreach ($this->attacking() as $pieces) {
if (is_a($pieces, AbstractLinePiece::class)) {
foreach ($this->attacking() as $piece) {
if (is_a($piece, AbstractLinePiece::class)) {
$king = $this->board->piece($this->color, Piece::K);
if ($this->isBetween($pieces, $king) && $this->isEmpty($this->line($king->sq))) {
return $pieces;
if ($this->isBetween($piece, $king) && $this->isEmpty($this->line($king->sq))) {
return $piece;
}
}
}
Expand Down

0 comments on commit d1fd37f

Please sign in to comment.