Skip to content

Commit

Permalink
chess: fix some moves being flagged as quiet moves when they shouldn't
Browse files Browse the repository at this point in the history
have
  • Loading branch information
e0ff committed Nov 26, 2023
1 parent b727a54 commit 0452d8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/chess/movegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func generateKnightMoves(position Position, genType MoveGenerationType) []Move {
toSquare := Square(capturesBB.PopLsb())
piece, _ := position.GetPieceAt(toSquare)

move := NewMove(fromSquare, toSquare, NormalMove, QuietMoveFlag)
move := NewMove(fromSquare, toSquare, NormalMove, NoMoveFlag)
move.WithCapture(piece)

moves = append(moves, move)
Expand Down Expand Up @@ -145,7 +145,7 @@ func generateBishopMoves(position Position, pieceBB BitBoard, genType MoveGenera
toSquare := Square(capturesBB.PopLsb())
piece, _ := position.GetPieceAt(toSquare)

move := NewMove(fromSquare, toSquare, NormalMove, QuietMoveFlag)
move := NewMove(fromSquare, toSquare, NormalMove, NoMoveFlag)
move.WithCapture(piece)

moves = append(moves, move)
Expand Down Expand Up @@ -180,7 +180,7 @@ func generateRookMoves(position Position, pieceBB BitBoard, genType MoveGenerati
toSquare := Square(capturesBB.PopLsb())
piece, _ := position.GetPieceAt(toSquare)

move := NewMove(fromSquare, toSquare, NormalMove, QuietMoveFlag)
move := NewMove(fromSquare, toSquare, NormalMove, NoMoveFlag)
move.WithCapture(piece)

moves = append(moves, move)
Expand Down Expand Up @@ -226,7 +226,7 @@ func generateKingMoves(position Position, genType MoveGenerationType, includeCas
toSquare := Square(capturesBB.PopLsb())
piece, _ := position.GetPieceAt(toSquare)

move := NewMove(kingSquare, toSquare, NormalMove, QuietMoveFlag)
move := NewMove(kingSquare, toSquare, NormalMove, NoMoveFlag)
move.WithCapture(piece)

moves = append(moves, move)
Expand Down

0 comments on commit 0452d8e

Please sign in to comment.