From 6cb359845243bd69d1b06bb1407fb618f0ddae32 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 5 Jun 2012 22:21:58 +0000 Subject: Improved format of saved files. --- src/solverwindow.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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'; } } -- cgit v1.2.3