Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

connect: Make exercise schema-compliant #670

Merged
merged 2 commits into from
Mar 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions exercises/connect/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"exercise": "connect",
"version": "1.0.0",
"cases": [
{
"description": "an empty board has no winner",
"property": "winner",
"board": [
". . . . .",
" . . . . .",
Expand All @@ -13,20 +16,23 @@
},
{
"description": "X can win on a 1x1 board",
"property": "winner",
"board": [
"X"
],
"expected": "X"
},
{
"description": "O can win on a 1x1 board",
"property": "winner",
"board": [
"O"
],
"expected": "O"
},
{
"description": "only edges does not make a winner",
"property": "winner",
"board": [
"O O O X",
" X . . X",
Expand All @@ -37,6 +43,7 @@
},
{
"description": "illegal diagonal does not make a winner",
"property": "winner",
"board": [
"X O . .",
" O X X X",
Expand All @@ -48,17 +55,19 @@
},
{
"description": "nobody wins crossing adjacent angles",
"property": "winner",
"board": [
"X . . .",
" . X O .",
" O . X O",
" . O . X",
" . . O ."
"X . . .",
" . X O .",
" O . X O",
" . O . X",
" . . O ."
],
"expected": ""
},
{
"description": "X wins crossing from left to right",
"property": "winner",
"board": [
". O . .",
" O X X X",
Expand All @@ -70,6 +79,7 @@
},
{
"description": "O wins crossing from top to bottom",
"property": "winner",
"board": [
". O . .",
" O X X X",
Expand All @@ -81,17 +91,19 @@
},
{
"description": "X wins using a convoluted path",
"property": "winner",
"board": [
". X X . .",
" X . X . X",
" . X . X .",
" . X X . .",
" O O O O O"
],
],
"expected": "X"
},
{
"description": "X wins using a spiral path",
"property": "winner",
"board": [
"O X X X X X X X X",
" O X O O O O O O O",
Expand All @@ -106,4 +118,4 @@
"expected": "X"
}
]
}
}