TKPending / ChessGame

HTML and Javascript Chess Game
0 stars 0 forks source link

CG-8 Restricted Pawn Moves #9

Closed TKPending closed 9 months ago

TKPending commented 9 months ago

Currently, pawns can move diagonal despite not capturing any pieces. The two jumps at the beginning is also available regardless of where the pawn is on the board. Need to create restriction to prevent this from happening, so that they move according to general pawn logic

TKPending commented 9 months ago

Added logic to prevent the capture movement. Only available when you're about to capture a piece. Also added logic to prevent the double moves unless the pawn is in it's starting position.