Update things
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
package be.vandewalleh.aoc.days
|
||||
|
||||
import be.vandewalleh.aoc.utils.input.Day
|
||||
import be.vandewalleh.aoc.utils.input.Input
|
||||
import be.vandewalleh.aoc.utils.input.Lines
|
||||
import org.eclipse.collections.api.factory.Bags
|
||||
import org.eclipse.collections.api.multimap.set.MutableSetMultimap
|
||||
import org.eclipse.collections.impl.factory.Multimaps
|
||||
|
||||
@Day(21)
|
||||
class Day21(@Lines val input: Input<List<String>>) {
|
||||
private val foods = input.value.map { line ->
|
||||
class Day21(@Lines val input: List<String>) {
|
||||
private val foods = input.map { line ->
|
||||
val parOpen = line.indexOf('(')
|
||||
val ingredients = line.substring(0 until parOpen - 1).split(" ")
|
||||
val allergens = line.substring(parOpen + 1 until line.length - 1).removePrefix("contains ").split(", ")
|
||||
|
||||
Reference in New Issue
Block a user