mirror of
https://github.com/onyx-and-iris/aoc2023.git
synced 2024-11-24 03:10:47 +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 {
|
||||
return 0, err
|
||||
}
|
||||
if counter[colour] == 0 {
|
||||
counter[colour] = n
|
||||
} else if counter[colour] < n {
|
||||
if counter[colour] < n {
|
||||
counter[colour] = n
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user