Drempel3387 / chessGame

1 stars 0 forks source link

Pawns can Capture Backwards #4

Closed Drempel3387 closed 1 year ago

Drempel3387 commented 1 year ago

https://github.com/Drempel3387/chessGame/blob/391a02b4500be4b47dd71307ade7ea1f48481f73/src/chess/engine/Pieces/Pawn.java#L57

If an enemy piece is one rank behind the pawn, and within a one file distance, a pawn can capture it. This should not be possible since pawns can only move forward.

Drempel3387 commented 1 year ago

The POSSIBLE_CAPTURES coordinates have been updated to "new Coordinate(1, 1), new Coordinate(-1, 1)". before it was "new Coordinate(1, 1), new Coordinate(1, -1)" which allowed the pawn to capture and move backwards.