diff --git a/connect.json b/connect.json new file mode 100644 index 0000000000..cfd9ae66c7 --- /dev/null +++ b/connect.json @@ -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" + } + ] +} \ No newline at end of file