Created attachment 141 [details] Pawn can move past another piece Steps to reproduce: 1. Run App.java 2. Make the following moves: 1. e4 e6 2. d4 e5 3. f4 e3 On the last move, e3, pawn is attempting to move up 2 pieces, and jump over another piece. Expected result: Move is invalid and therefore not executed. Actual result: Move is recognized as valid and executed.
Reason: This bug was happening in one special case. Namely, pawn wants to go 2 squares up, but there is a piece which is one square up. Reason was that we forgot to test that there is no piece on one position up from the pawn. Resolution: In case when pawn tries to move two squares up, I added condition that there is no piece one square above the pawn. Line 38 of the fix. https://github.com/glennsalter/cs3343-chess/commit/861dd141580fa489c0ff3f64b749e1ebc0653a36