Readability improvements
This commit is contained in:
@@ -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])
|
||||
|
Reference in New Issue
Block a user