celeroncoder / celeroncoder/Chess
Add pawn attacking move at its diagonals.
- Dominant language
- Java
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
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).
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no files or tests, so start by locating the Java Pawn move implementation and any existing move-generation tests. Verify ordinary diagonal captures, then the en passant rule and its immediate expiration. Done means both capture behaviors are represented correctly and existing behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100