diff options
author | Stijn Buys <ingar@osirion.org> | 2012-06-05 22:21:58 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-06-05 22:21:58 +0000 |
commit | 6cb359845243bd69d1b06bb1407fb618f0ddae32 (patch) | |
tree | 2d44ed2c7f2cf41b7a0f29729cc8800ee992b518 /src | |
parent | 62162c4921a32edaffa8599e9e0ee9cf875bf5d7 (diff) |
Improved format of saved files.
Diffstat (limited to 'src')
-rw-r--r-- | src/solverwindow.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/solverwindow.cc b/src/solverwindow.cc index f900986..9bda3d5 100644 --- a/src/solverwindow.cc +++ b/src/solverwindow.cc @@ -119,7 +119,19 @@ void SolverWindow::save() solverwindow_sudokuwidget->get_values(sudoku); for (int row = 0; row < 9; row++) { for (int column = 0; column < 9 ; column++) { - textstream << sudoku.value(row, column) << '\n'; + textstream << sudoku.value(row, column); + if (column < 8) { + textstream << ' '; + if ((column % 3) == 2) { + textstream << ' '; + } + + } else { + textstream << '\n'; + } + } + if ((row < 8) && ((row % 3) == 2)) { + textstream << '\n'; } } |