Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions bin/run-generator
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -eu

cd generators
lake exe generator "$@"
6 changes: 6 additions & 0 deletions exercises/practice/connect/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
10 changes: 10 additions & 0 deletions exercises/practice/connect/ConnectTest.lean
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ def connectTests : TestSuite :=
" O X O .",
" X X O X",
" . O X ."]))
|>.addTest "X wins with left-hand dead end fork" (do
return assertEqual 'X' (Connect.winner #[". . X .",
" X X . .",
" . X X X",
" O O O O"]))
|>.addTest "X wins with right-hand dead end fork" (do
return assertEqual 'X' (Connect.winner #[". . X X",
" X X . .",
" . X X .",
" O O O O"]))
|>.addTest "O wins crossing from top to bottom" (do
return assertEqual 'O' (Connect.winner #[". O . .",
" O X X X",
Expand Down
Loading