Skip to content

Commit

Permalink
Merge pull request #297 from jonatas/add-connect
Browse files Browse the repository at this point in the history
connect: adding examples for connect exercise
  • Loading branch information
Insti authored Jul 25, 2016
2 parents bdd094a + 6c6a395 commit 2c29767
Showing 1 changed file with 95 additions and 0 deletions.
95 changes: 95 additions & 0 deletions connect.json
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"
}
]
}

0 comments on commit 2c29767

Please sign in to comment.