Logo: Relish

  1. Sign in

Project: Tic-tac-toe

Players take turns

In order to play Tic Tac Toe

As a human player

I want to play against an opponent

Scenarios
take turns
Given
the grid:
X O
X
O
And
I will mark position number "3"
When
the game continuous
Then
the grid should update
And
player "X" should go next
And
the grid should update
And
player "O" should go next
mark open position
Given
the grid:
X O
X
O
And
I will mark position number "3"
When
the game continuous
Then
player "O" should go next
And
the next position number provided should be "3"
And
the grid should update
mark already taken position
Given
the grid:
X O
X
O
And
I will mark position number "1"
And
I will mark position number "3"
When
the game continuous
Then
player "O" should go next
And
the next position number provided should be "1"
And
the position number should be invalid
And
player "O" should go next
And
the next position number provided should be "3"
And
the grid should update
mark empty position number
Given
the grid:
X O
X
O
And
I will mark position number ""
And
I will mark position number "3"
When
the game continuous
Then
player "O" should go next
And
the next position number provided should be ""
And
the position number should be invalid
And
player "O" should go next
mark too big of a position number
Given
the grid:
X O
X
O
And
I will mark position number "10"
And
I will mark position number "3"
When
the game continuous
Then
player "O" should go next
And
the next position number provided should be "10"
And
the position number should be invalid
And
player "O" should go next
take turns until terminal game 1247536
Given
the grid:
X O
X
O
And
I will mark position number "3"
When
the game continuous
Then
player "X" should go next
And
player "O" should go next
And
player "X" should go next
And
the game should be terminal next

Last published about 5 years ago by esambo.