Skip to content

Commit

Permalink
Updated features with better board descriptors and added smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
edendevelopment committed Dec 22, 2009
1 parent b810111 commit 102f1d0
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 23 deletions.
17 changes: 5 additions & 12 deletions features/movement.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,11 @@ Feature: Movement
I want to roll dice and move up and down the board

Background:
Given the board:
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . 02. 10. . . . .|

Given a board with:
| type | from | to |
| snake | 3 | 2 |
| ladder | 5 | 10 |

Scenario: Starting a game
When I start a game with 2 players
And player 1 rolls 1
Expand Down
24 changes: 24 additions & 0 deletions features/smoke_test.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Feature: Smoke test: combination of moves
In order to play a full game
As a player
I want the moves to work in combination

Background:
Given a board with:
| type | from | to |
| snake | 3 | 2 |
| ladder | 5 | 10 |
| snake | 15 | 11 |
| ladder | 1 | 7 |
| ladder | 14 | 23 |

Scenario: Playing a game
When I start a game with 3 players
And player 1 rolls 1
And player 2 rolls 6
And player 2 rolls 6
And player 2 rolls 3
And player 1 rolls 3
And player 2 rolls 4
Then player 1 is now on position 10
And player 2 is now on position 23
15 changes: 4 additions & 11 deletions features/win_condition.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,10 @@ Feature: Win condition
I want to land on space 100 and win the game

Background:
Given the board:
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . . . . . . . . .|
|. . . . . . . . . .|
Given a board with:
| type | from | to |
| snake | 3 | 2 |
| ladder | 5 | 10 |

Scenario: Win the game
Given player 1 is on position 97
Expand Down

0 comments on commit 102f1d0

Please sign in to comment.