mirror of
https://github.com/onyx-and-iris/aoc2023.git
synced 2024-11-15 15:10:49 +00:00
no need to check if colour count is 0, just bump.
This commit is contained in:
parent
5b1ca25d3f
commit
4593c171d8
@ -20,9 +20,7 @@ func powerForGame(data string) (int, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
if counter[colour] == 0 {
|
if counter[colour] < n {
|
||||||
counter[colour] = n
|
|
||||||
} else if counter[colour] < n {
|
|
||||||
counter[colour] = n
|
counter[colour] = n
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user