Skip to content

Commit 6215475

Browse files
committed
Start
1 parent 50a251e commit 6215475

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

Source/SudokuSolver/Extraction.fs

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module Extraction
2+
3+
let original =
4+
[[ 1; 2; 3; 4]
5+
[ 5; 6; 7; 8]
6+
[ 9; 10; 11; 12]
7+
[13; 14; 15; 16]]
8+
9+
let extracted_rows =
10+
[[ 1; 2; 3; 4]
11+
[ 5; 6; 7; 8]
12+
[ 9; 10; 11; 12]
13+
[13; 14; 15; 16]]
14+
15+
let extracted_cols =
16+
[[ 1; 5; 9; 13]
17+
[ 2; 6; 10; 14]
18+
[ 3; 7; 11; 15]
19+
[ 4; 8; 12; 16]]
20+
21+
let extracted_boxes =
22+
[[ 1; 2; 5; 6]
23+
[ 3; 4; 7; 8]
24+
[ 9; 10; 13; 14]
25+
[11; 12; 15; 16]]

Source/SudokuSolver/Program.fs

+10-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
[0; 3; 0; 0]
55
[2; 0; 0; 0]]
66

7+
let field1_solved =
8+
[[1; 2; 3; 4]
9+
[3; 4; 1; 2]
10+
[4; 3; 2; 1]
11+
[2; 1; 4; 3]]
12+
713
let field2 =
814
[[0; 0; 8; 3; 0; 0; 6; 0; 0]
915
[0; 0; 4; 0; 0; 0; 0; 1; 0]
@@ -15,4 +21,7 @@ let field2 =
1521

1622
[0; 0; 0; 9; 1; 0; 0; 0; 5]
1723
[0; 0; 3; 0; 5; 0; 0; 0; 2]
18-
[0; 5; 0; 0; 0; 0; 0; 7; 4]]
24+
[0; 5; 0; 0; 0; 0; 0; 7; 4]]
25+
26+
System.Console.ReadLine() |> ignore
27+

Source/SudokuSolver/SudokuSolver.fsproj

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<Reference Include="System.Numerics" />
4343
</ItemGroup>
4444
<ItemGroup>
45+
<Compile Include="Extraction.fs" />
4546
<Compile Include="Program.fs" />
4647
</ItemGroup>
4748
<Import Project="$(MSBuildExtensionsPath32)\FSharp\1.0\Microsoft.FSharp.Targets" Condition="!Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" />

0 commit comments

Comments
 (0)