|
|
@ -6,10 +6,6 @@ class Day2Test { |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|
fun readGames() { |
|
|
fun readGames() { |
|
|
val compatibleGames = Day2.readGames().filter { game -> |
|
|
|
|
|
Hand(12, 13, 14).let(game::isCompatibleWith) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
assert(compatibleGames.map(Game::id).joinToString(separator=",") == "1,2,5") |
|
|
|
|
|
|
|
|
assert(Day2.sumOfCompatibleGames(Hand(12, 13, 14)) == 8) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |