Attempt day 14 part 2

This commit is contained in:
Sven Weidauer 2024-12-15 11:26:12 +01:00
parent 3351c1f4a7
commit dbcf8c228f

View file

@ -36,6 +36,21 @@ fun main() {
}
val part1 = topLeft * topRight * bottomLeft * bottomRight
println("Part 1: $part1")
var time = 0
while (time < 100) {
val grid = CharGrid(WIDTH, HEIGHT, '.')
for (robot in initial) {
val pos = robot.move(time).position
grid[pos] = '#'
}
println("t = $time")
println(grid.rows.joinToString(separator = "\n"));
println()
++time
}
}
private const val WIDTH = 101