Skip to content

Commit

Permalink
chess: remove useless if statement in updateAttackers
Browse files Browse the repository at this point in the history
  • Loading branch information
e0ff committed Nov 26, 2023
1 parent 6bb5ae3 commit b727a54
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions internal/chess/position.go
Original file line number Diff line number Diff line change
Expand Up @@ -841,10 +841,6 @@ func (p *Position) updateAttackers() {

moves := append(ourAttacks, theirAttacks...)
for _, move := range moves {
if move.HasFlag(PawnPushMoveFlag) { // skip pawn pushes, they aren't attacks
continue
}

p.attackersBB[move.To].SetBit(uint64(move.From))
}
}
Expand Down

0 comments on commit b727a54

Please sign in to comment.