We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ca1dc0 commit ea17b3fCopy full SHA for ea17b3f
src/main/kotlin/days/day11.kt
@@ -50,13 +50,13 @@ fun inspectItem(
50
monkeyItems.toMutableMap().let {
51
it[monkey] = it[monkey]!!.first.drop(1) to it[monkey]!!.second + 1
52
val newItem = monkeyBehaviour[monkey]!!.first(item)
53
- val newItemDivided = worryReduction(newItem)
+ val newItemReduced = worryReduction(newItem)
54
val newMonkey =
55
- if ((newItemDivided % monkeyBehaviour[monkey]!!.second.first) == 0L)
+ if ((newItemReduced % monkeyBehaviour[monkey]!!.second.first) == 0L)
56
monkeyBehaviour[monkey]!!.second.second
57
else
58
monkeyBehaviour[monkey]!!.second.third
59
- it[newMonkey] = it[newMonkey]!!.first.plus(newItemDivided) to it[newMonkey]!!.second
+ it[newMonkey] = it[newMonkey]!!.first.plus(newItemReduced) to it[newMonkey]!!.second
60
it.toMap()
61
}
62
0 commit comments