mirror of
https://github.com/onyx-and-iris/aoc2023.git
synced 2024-11-21 18:00:47 +00:00
fix index
This commit is contained in:
parent
219bb3884b
commit
92ff666ae2
@ -32,8 +32,8 @@ func cycleMany(image img, iterations int) {
|
||||
copy(cachedImages[i+1], image.raw)
|
||||
}
|
||||
|
||||
period := i - start // length of a full period
|
||||
copy(image.raw, cachedImages[start+((iterations-i-1)%period)]) // copy cachedImage into image.raw
|
||||
period := i - start // length of a full period
|
||||
copy(image.raw, cachedImages[start+((iterations-i-1)%period)+1]) // copy cachedImage into image.raw
|
||||
}
|
||||
|
||||
// two returns the load of all boulders after 1000000000 cycles
|
||||
|
Loading…
Reference in New Issue
Block a user