File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed
exercises/practice/connect Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -eu
4+
5+ cd generators
6+ lake exe generator " $@ "
Original file line number Diff line number Diff line change @@ -30,6 +30,12 @@ description = "nobody wins crossing adjacent angles"
3030[cd61c143-92f6-4a8d-84d9-cb2b359e226b ]
3131description = " X wins crossing from left to right"
3232
33+ [495e33ed-30a9-4012-b46e-d7c4d5fe13c3 ]
34+ description = " X wins with left-hand dead end fork"
35+
36+ [ab167ab0-4a98-4d0f-a1c0-e1cddddc3d58 ]
37+ description = " X wins with right-hand dead end fork"
38+
3339[73d1eda6-16ab-4460-9904-b5f5dd401d0b ]
3440description = " O wins crossing from top to bottom"
3541
Original file line number Diff line number Diff line change @@ -38,6 +38,16 @@ def connectTests : TestSuite :=
3838 " O X O ." ,
3939 " X X O X" ,
4040 " . O X ." ]))
41+ |>.addTest "X wins with left-hand dead end fork" (do
42+ return assertEqual 'X' (Connect.winner #[". . X ." ,
43+ " X X . ." ,
44+ " . X X X" ,
45+ " O O O O" ]))
46+ |>.addTest "X wins with right-hand dead end fork" (do
47+ return assertEqual 'X' (Connect.winner #[". . X X" ,
48+ " X X . ." ,
49+ " . X X ." ,
50+ " O O O O" ]))
4151 |>.addTest "O wins crossing from top to bottom" (do
4252 return assertEqual 'O' (Connect.winner #[". O . ." ,
4353 " O X X X" ,
You can’t perform that action at this time.
0 commit comments