| Summary: | Pawn can eat pieces in front of it | ||
|---|---|---|---|
| Product: | Chess Game - Group 24 | Reporter: | gsalter2-c |
| Component: | Chess | Assignee: | jtoromano2-c |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | gsalter2-c |
| Priority: | --- | ||
| Version: | unspecified | ||
| Hardware: | PC | ||
| OS: | Mac OS | ||
| Attachments: | Pawn can eat pieces in front of it | ||
Reason: Square where pawn wants to move shouldn't have piece, otherwise, move is not valid. We forgot to test that condition initially. Resolution: Adding condition to check if final point where pawn wants to move already has piece. If that is true, move is invalid. https://github.com/glennsalter/cs3343-chess/commit/861dd141580fa489c0ff3f64b749e1ebc0653a36 |
Created attachment 139 [details] Pawn can eat pieces in front of it Steps to reproduce: 1. Run App.java 2. Execute the following moves: 1. d4 d5 2. dxd5 In the last move, dxd5, white pawn attempts to eat black pawn 1 box in front of it, which is invalid. Expected results: Move is invalid, therefore not executed. Actual resutls: Move is counted as valid and executed.