Readability improvements

This commit is contained in:
2024-12-15 21:09:15 -08:00
parent 779f21a289
commit ea1c1cd462
2 changed files with 20 additions and 17 deletions

View File

@@ -55,7 +55,9 @@ func printRobots(_ bots: [Robot]) -> String {
screen[q][bot.x] = ""
}
}
return screen.map { row in row.joined() }.joined(separator: "\n")
return "" + String(repeating: "", count: w) + "\n" +
screen.map { row in "" + row.joined() + "" }.joined(separator: "\n") +
"\n" + String(repeating: "", count: w) + ""
}
var bots = try readInput(CommandLine.arguments[1])