forked from exercism/problem-specifications
-
Notifications
You must be signed in to change notification settings - Fork 0
/
connect.json
109 lines (109 loc) · 2.18 KB
/
connect.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{
"cases": [
{
"description": "an empty board has no winner",
"board": [
". . . . .",
" . . . . .",
" . . . . .",
" . . . . .",
" . . . . ."
],
"expected": ""
},
{
"description": "X can win on a 1x1 board",
"board": [
"X"
],
"expected": "X"
},
{
"description": "O can win on a 1x1 board",
"board": [
"O"
],
"expected": "O"
},
{
"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"
}
]
}