Scenario: Pawn can only move directly forward one square
GIVEN a <color> pawn in <from>
AND <to> is vacant
WHEN the pawn is moved forward
THEN the pawn is in <to>
Example:
| color | from | to |
| WHITE | A2 | A3 |
| BLACK | A7 | A6
Scenario: Pawn is stuck when the square is not vacant
GIVEN a <color> pawn in <from>
AND <to> is not vacant
WHEN the pawn is moved forward
THEN the pawn stays in <from>
Example:
| color | from | to |
| WHITE | A2 | A3 |
| BLACK | A7 | A6
Scenario: Pawn can move directly forward two squares on their first move only
GIVEN a <color> pawn in <from>
AND <forward> is vacant
AND <to> is vacant
WHEN the pawn is moved forward two squares
THEN the pawn is in <to>
Example:
| color | from | forward | to |
| WHITE | A2 | A3 | A4 |
| WHITE | B2 | B3 | B4 |
| WHITE | C2 | C3 | C4 |
| WHITE | D2 | D3 | D4 |
| WHITE | E2 | E3 | E4 |
| WHITE | F2 | F3 | F4 |
| WHITE | G2 | G3 | G4 |
| WHITE | H2 | H3 | H4 |
| BLACK | A7 | A6 | A5 |
| BLACK | B7 | B6 | B5 |
| BLACK | C7 | C6 | C5 |
| BLACK | D7 | D6 | D5 |
| BLACK | E7 | E6 | E5 |
| BLACK | F7 | F6 | F5 |
| BLACK | G7 | G6 | G5 |
| BLACK | H7 | H6 | H5 |
Scenario: Pawn can move diagonally forward when capturing an opposing piece
GIVEN a <color> pawn in <from>
AND an opposing piece in <opponent-location>
WHEN the pawn is moved to <opponent-location>
THEN the pawn captures the opposing piece
Example:
| color | from | opponent-location |
| WHITE | B3 | A4 |
| WHITE | B3 | C4 |
| BLACK | B5 | C4 |
| BLACK | B5 | A4 |
Feature: Pawn
Scenario: Pawn can only move directly forward one square
Scenario: Pawn is stuck when the square is not vacant
Scenario: Pawn can move directly forward two squares on their first move only
Scenario: Pawn can move diagonally forward when capturing an opposing piece