merge
Some checks failed
Linux arm64 / Build (push) Failing after 20s

This commit is contained in:
Janet-Doe
2025-01-21 19:10:06 +01:00
parent 963cea897c
commit 4bd55d4ce4
9 changed files with 151 additions and 37 deletions

View File

@@ -7,16 +7,16 @@ public class SudokuPrinter {
public static void printRectangleSudoku(final Sudoku s, int blockWidth, int blockHeight) {
for (int y = 0; y < s.getSize(); y++) {
if (y % blockHeight == 0 && y > 0) {
System.out.println("");
System.out.println();
}
String line = "[ ";
StringBuilder line = new StringBuilder("[ ");
for (int x = 0; x < s.getSize(); x++) {
line += (s.getCell(x, y).getSymbolIndex() + 1) + " ";
line.append((s.getCell(x, y).getSymbolIndex() + 1)).append(" ");
if (x % blockWidth == blockWidth - 1 && x != blockWidth * blockHeight - 1) {
line += "| ";
line.append("| ");
}
}
line += "]";
line.append("]");
System.out.println(line);
}
}