Logo: Relish

  1. Sign up
  2. Sign in

Project: Tic-tac-toe

Best Position

In order to play Tic Tac Toe
As an AI player
I want to never lose and win whenever possible

Scenarios
place the final and winning mark
Given
the grid:
X O X
O X O
O X
When
the AI places its best position
Then
I should see the grid:
X O X
O X O
O X X
place the winning mark among several empty spaces
Given
the grid:
X O
X O
When
the AI places its best position
Then
I should see the grid:
X O
X O
X
draw
Given
the grid:
X X O
O O X
X
When
the AI analyzes the best position
Then
the game should at least be a draw
prevent O from winning next 173259 48
Given
the grid:
X O X
X
O O
When
the AI places its best position
Then
I should see the grid:
X O X
X
O X O

Last published over 1 year ago by esambo.