This guide helps verify that Slice 4 (Parse and Execute Simple Pawn Moves) is working correctly.
./termchess- Run the application
- Select "New Game" from the main menu
- Type:
e2e4 - Press Enter
Expected:
- Input field clears
- White pawn moves from e2 to e4
- Turn indicator changes to "Black to move"
- No error message displayed
- Continue from Test 1
- Type:
e7e5 - Press Enter
Expected:
- Input field clears
- Black pawn moves from e7 to e5
- Turn indicator changes to "White to move"
- No error message displayed
- Continue from Test 2
- Type:
invalid - Press Enter
Expected:
- Error message appears: "invalid move format: expected 4-5 characters"
- Board state unchanged
- Still White to move
- Start a new game
- Type:
e2e5 - Press Enter
Expected:
- Error message appears: "illegal move: e2e5"
- Board state unchanged
- Still White to move
- Continue from Test 4 (error message visible)
- Start typing a new move (e.g., type 'e')
Expected:
- Error message disappears immediately
- Input shows the character typed
- Type:
e2e4 - Press Backspace once
Expected:
- Input shows:
e2e - Can continue typing or backspace more
- Start a new game
- Move white pawn:
e2e4+ Enter - Move black pawn:
e7e5+ Enter - Move white knight:
g1f3+ Enter
Expected:
- White knight moves from g1 to f3
- Board updates correctly
- Turn indicator shows "Black to move"
Enter these moves in sequence:
e2e4e7e5g1f3b8c6f1b5
Expected:
- All moves execute successfully
- Board shows the Spanish Opening position
- Turn indicator shows "Black to move"
- Can enter moves using coordinate notation
- Valid moves execute and update the board
- Invalid move formats show error messages
- Illegal moves show error messages
- Turn indicator updates correctly after each move
- Error messages clear when typing new input
- Backspace removes characters from input
- Input clears after successful move
- Board display shows all pieces correctly
- Can quit with 'q' key
- No checkmate/stalemate detection (future slice)
- No move history display (future slice)
- No move validation highlighting (future slice)
- No undo/redo functionality (future slice)