]> gitweb.factorcode.org Git - factor.git/blob - extra/sudoku/sudoku-tests.factor
ui.tools.listener.completion: change history completion popup to preserve newlines
[factor.git] / extra / sudoku / sudoku-tests.factor
1 USING: io.streams.string sudoku tools.test ;
2
3 { "Puzzle:
4 . . 1 . . 5 3 . .
5 . 5 . 4 9 . . . .
6 . . . 1 . 2 . 6 4
7 . . . . . . 7 5 .
8 6 . . . . . . . 1
9 . 3 5 . . . . . .
10 4 6 . 9 . 3 . . .
11 . . . . 2 4 . 9 .
12 . . 3 6 . . 1 . .
13 Solution:
14 2 4 1 8 6 5 3 7 9
15 3 5 6 4 9 7 2 1 8
16 8 7 9 1 3 2 5 6 4
17 1 9 4 3 8 6 7 5 2
18 6 8 2 5 7 9 4 3 1
19 7 3 5 2 4 1 9 8 6
20 4 6 7 9 1 3 8 2 5
21 5 1 8 7 2 4 6 9 3
22 9 2 3 6 5 8 1 4 7
23 1 solutions.
24 " } [
25     [ sudoku-demo ] with-string-writer
26 ] unit-test