-
-
Notifications
You must be signed in to change notification settings - Fork 547
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #297 from jonatas/add-connect
connect: adding examples for connect exercise
- Loading branch information
Showing
1 changed file
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"cases": [ | ||
{ | ||
"description": "an empty board has no winner", | ||
"board": [ | ||
". . . . .", | ||
" . . . . .", | ||
" . . . . .", | ||
" . . . . .", | ||
" . . . . ." | ||
], | ||
"expected": "" | ||
}, | ||
{ | ||
"description": "only edges does not make a winner", | ||
"board": [ | ||
"O O O X", | ||
" X . . X", | ||
" X . . X", | ||
" X O O O" | ||
], | ||
"expected": "" | ||
}, | ||
{ | ||
"description": "illegal diagonal does not make a winner", | ||
"board": [ | ||
"X O . .", | ||
" O X X X", | ||
" O X O .", | ||
" . O X .", | ||
" X X O O" | ||
], | ||
"expected": "" | ||
}, | ||
{ | ||
"description": "nobody wins crossing adjacent angles", | ||
"board": [ | ||
"X . . .", | ||
" . X O .", | ||
" O . X O", | ||
" . O . X", | ||
" . . O ." | ||
], | ||
"expected": "" | ||
}, | ||
{ | ||
"description": "X wins crossing from left to right", | ||
"board": [ | ||
". O . .", | ||
" O X X X", | ||
" O X O .", | ||
" X X O X", | ||
" . O X ." | ||
], | ||
"expected": "X" | ||
}, | ||
{ | ||
"description": "O wins crossing from top to bottom", | ||
"board": [ | ||
". O . .", | ||
" O X X X", | ||
" O O O .", | ||
" X X O X", | ||
" . O X ." | ||
], | ||
"expected": "O" | ||
}, | ||
{ | ||
"description": "X wins using a convoluted path", | ||
"board": [ | ||
". X X . .", | ||
" X . X . X", | ||
" . X . X .", | ||
" . X X . .", | ||
" O O O O O" | ||
], | ||
"expected": "X" | ||
}, | ||
{ | ||
"description": "X wins using a spiral path", | ||
"board": [ | ||
"O X X X X X X X X", | ||
" O X O O O O O O O", | ||
" O X O X X X X X O", | ||
" O X O X O O O X O", | ||
" O X O X X X O X O", | ||
" O X O O O X O X O", | ||
" O X X X X X O X O", | ||
" O O O O O O O X O", | ||
" X X X X X X X X O" | ||
], | ||
"expected": "X" | ||
} | ||
] | ||
} |