You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scenario: A rook can move horizontally and vertically while it is not obstructed
GIVEN a <color> rook in <from>
AND the squares between <from> and <to> are vacant
WHEN the rook is moved <times> <direction>
THEN the rook is in <to>
Example:
| color | from | times | direction | to |
| WHITE | A1 | 4 | FORWARD | A5 |
| WHITE | A5 | 2 | SHIFT_RIGHT | C5 |
| WHITE | C5 | 2 | SHIFT_LEFT | A5 |
| WHITE | A5 | 4 | BACKWARD | A1 |
| BLACK | A8 | 4 | FORWARD | A4 |
| BLACK | A4 | 2 | SHIFT_LEFT | C4 |
| BLACK | C4 | 2 | SHIFT_RIGHT | A4 |
| BLACK | A4 | 4 | BACKWARD | A8 |
Scenario: Rook can not move beyond an obstructed path
GIVEN a <color> rook in <from>
AND the square <obstructed> is not vacant
WHEN the rook is moved <time> <direction>
THEN the move is refused
Example:
| color | from | obstructed | times | direction |
| WHITE | A1 | A3 | 4 | FORWARD |
| WHITE | A5 | C5 | 2 | SHIFT_RIGHT |
| WHITE | E5 | C5 | 2 | SHIFT_LEFT |
| WHITE | A5 | A3 | 4 | BACKWARD |
| BLACK | A8 | A6 | 4 | FORWARD |
| BLACK | A4 | C4 | 2 | SHIFT_LEFT |
| BLACK | E4 | C4 | 2 | SHIFT_RIGHT |
| BLACK | A4 | A6 | 2 | BACKWARD |
Scenario: Rook can capture an opposing piece that obstruct its way
GIVEN a <color> rook in <from>
AND an opposing piece in <to>
WHEN the rook is moved to <to>
THEN the rook captures the opposing piece
Example:
| color | from | to |
| WHITE | A1 | A3 |
| WHITE | A5 | C5 |
| WHITE | E5 | C5 |
| WHITE | A5 | A3 |
| BLACK | A8 | A6 |
| BLACK | A4 | C4 |
| BLACK | E4 | C4 |
| BLACK | A4 | A6 |
The text was updated successfully, but these errors were encountered:
Feature: Rook
Scenario: A rook can move horizontally and vertically while it is not obstructed
Scenario: Rook can not move beyond an obstructed path
Scenario: Rook can capture an opposing piece that obstruct its way
The text was updated successfully, but these errors were encountered: