This commit is contained in:
maieu 2025-05-22 09:29:00 +02:00
parent 8cd0422aae
commit 435d790960
1 changed files with 2 additions and 2 deletions

View File

@ -432,12 +432,12 @@ public class Board {
} }
public String[] toFileRep() { public String[] toFileRep() {
String[] output = new String[height + 1]; // +1 for turn info String[] output = new String[height + 1];
for (int y = 0; y < height; y++) { for (int y = 0; y < height; y++) {
StringBuilder row = new StringBuilder(); StringBuilder row = new StringBuilder();
for (int x = 0; x < width; x++) { for (int x = 0; x < width; x++) {
if (x > 0) row.append(","); // Restore commas if (x > 0) row.append(",");
Piece p = getPieceAt(x, y); Piece p = getPieceAt(x, y);
if (p == null) { if (p == null) {
row.append(".."); row.append("..");