Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehjohn committed Mar 19, 2024
1 parent b0071b4 commit ed28552
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Sudoku.Console/ConsoleApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,23 @@ private void GeneratePuzzles(int clues, int puzzleCount)
}
}

lock (_consoleLock)
{
count++;

System.Console.CursorTop = 3;

System.Console.WriteLine($" Puzzle {count:N0}/{puzzleCount:N0}. \n");

lock (recentLock)
{
foreach (var item in recent)
{
System.Console.WriteLine($" {string.Join(string.Empty, item).Replace('0', '.')}");
}
}
}

lock (_outputFileLock)
{
File.AppendAllText(filename, $"{string.Join(string.Empty, puzzle).Replace('0', '.')}\n");
Expand Down

0 comments on commit ed28552

Please sign in to comment.