parseMonkeys = text => [...text.matchAll(monkeyRegex)].map(match => {
const {id, items, operation, argument, divisor, targetTrue, targetFalse} = match.groups
return {
id,
items: items.split(/,\s+/).map(x => parseInt(x)),
inspection: [operation, argument],
targeting: [divisor, targetTrue, targetFalse],
actionCount: 0
}
})