3402bc5474b069655e897634ae98e7d7e0bc83c5
[sudokuSolver.git] / SudokuSolver / Program.fs
1 module SudokuSolver.Main
2
3 module Solver = Version1
4
5 open System
6 open System.IO
7
8 [<EntryPoint>]
9 let main argv =
10 use fs = new FileStream ("../../../sudokus/mm_22.txt", FileMode.Open, FileAccess.Read)
11 use sr = new StreamReader (fs)
12
13 while sr.Peek () <> -1 do
14 let b = Solver.Board sr
15 b.Show System.Console.Out
16
17 printfn "vvvvvvvvvvv"
18
19 let timer = System.Diagnostics.Stopwatch ()
20 timer.Start ()
21
22 if b.Solve ()
23 then b.Show System.Console.Out
24 else printfn "No solution"
25
26 timer.Stop ()
27 printfn "Time: %A ms" timer.ElapsedMilliseconds
28 0