diff --git a/exercises/practice/connect/.meta/tests.toml b/exercises/practice/connect/.meta/tests.toml index 6ada87732c..951b87e5c4 100644 --- a/exercises/practice/connect/.meta/tests.toml +++ b/exercises/practice/connect/.meta/tests.toml @@ -30,6 +30,12 @@ description = "nobody wins crossing adjacent angles" [cd61c143-92f6-4a8d-84d9-cb2b359e226b] description = "X wins crossing from left to right" +[495e33ed-30a9-4012-b46e-d7c4d5fe13c3] +description = "X wins with left-hand dead end fork" + +[ab167ab0-4a98-4d0f-a1c0-e1cddddc3d58] +description = "X wins with right-hand dead end fork" + [73d1eda6-16ab-4460-9904-b5f5dd401d0b] description = "O wins crossing from top to bottom" diff --git a/exercises/practice/connect/connect_test.py b/exercises/practice/connect/connect_test.py index 9214cda980..2ed17be4f4 100644 --- a/exercises/practice/connect/connect_test.py +++ b/exercises/practice/connect/connect_test.py @@ -1,6 +1,6 @@ # These tests are auto-generated with test data from: # https://github.com/exercism/problem-specifications/tree/main/exercises/connect/canonical-data.json -# File last updated on 2026-02-19 +# File last updated on 2026-05-01 import unittest @@ -75,6 +75,26 @@ def test_x_wins_crossing_from_left_to_right(self): winner = game.get_winner() self.assertEqual(winner, "X") + def test_x_wins_with_left_hand_dead_end_fork(self): + game = ConnectGame( + """. . X . + X X . . + . X X X + O O O O""" + ) + winner = game.get_winner() + self.assertEqual(winner, "X") + + def test_x_wins_with_right_hand_dead_end_fork(self): + game = ConnectGame( + """. . X X + X X . . + . X X . + O O O O""" + ) + winner = game.get_winner() + self.assertEqual(winner, "X") + def test_o_wins_crossing_from_top_to_bottom(self): game = ConnectGame( """. O . .