celeroncoder / celeroncoder/Chess

Add pawn attacking move at its diagonals.

Aperta
#35 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Add an attacking or capturing move for Pawn.
> Unlike other pieces, the pawn does not capture in the same direction that it moves. A pawn captures diagonally forward one square to the left or right (see diagram).
>
> Another unusual rule is the en passant capture. It can occur after a pawn advances two squares using its initial two-step move option, and the square passed over is attacked by an enemy pawn. The enemy pawn is entitled to capture the moved pawn "in passing" – as if it had advanced only one square. The capturing pawn moves to the square over which the moved pawn passed (see diagram), and the moved pawn is removed from the board. The option to capture the moved pawn en passant must be exercised on the move immediately following the double-step pawn advance, or it is lost for the remainder of the game.

For more info, check out the wikipedia entry [here](https://en.wikipedia.org/wiki/Pawn_(chess)#Capturing).

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.