Skip to content

Commit

Permalink
Fix CheckForEnemyPiece bug in ChessBoard.js
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNtex committed Nov 19, 2023
1 parent da44954 commit 9b3f822
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ChessBoard.js
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ const ChessBoard = () => {
}
if(desiredCol < 0 || desiredCol > 3){
if(currentChessBoard[desiredRow][desiredCol < 0 ? 3 : 0] !== null){
if(!CheckForEnemyPiece(desiredRow,desiredCol,pieceColorWhite)){
if(!CheckForEnemyPiece(desiredRow,desiredCol < 0 ? 3 : 0,pieceColorWhite)){
return;
}
}
Expand Down

0 comments on commit 9b3f822

Please sign in to comment.