Joris PZ
12/11/2018, 5:32 PMtodd.ginsberg
12/11/2018, 5:56 PMandyb
12/12/2018, 11:38 AMtodd.ginsberg
12/12/2018, 6:25 PMwindow
, so that's always a good time. 🙂joelpedraza
12/12/2018, 7:03 PMinitial state: ##.##..#
..... => .
....# => .
...#. => .
...## => .
..#.. => #
..#.# => .
..##. => .
..### => .
.#... => .
.#..# => .
.#.#. => .
.#.## => .
.##.. => .
.##.# => .
.###. => .
.#### => .
#.... => #
#...# => .
#..#. => .
#..## => .
#.#.. => .
#.#.# => .
#.##. => .
#.### => .
##... => .
##..# => .
##.#. => .
##.## => #
###.. => .
###.# => .
####. => .
##### => .
karelpeeters
12/12/2018, 10:49 PMketurn
12/13/2018, 8:11 AMkarelpeeters
12/13/2018, 12:30 PMlittlelightcz
12/13/2018, 2:19 PMJoris PZ
12/13/2018, 3:44 PMprivate val turns = sequenceOf(Turn.LEFT, Turn.STRAIGHT, Turn.RIGHT).infinite().iterator()
Today's timings also nothing surprising (first/best of 25 in ms): JVM 182/13
, JS 206/75
, native 1048/995
joelpedraza
12/13/2018, 6:37 PMandyb
12/14/2018, 6:55 AMkarelpeeters
12/15/2018, 9:29 AMInt
, what if it starts with '0'
like one of the testcases?Gerard Klijs
12/15/2018, 10:03 PMJoris PZ
12/15/2018, 11:51 PMtodd.ginsberg
12/16/2018, 3:53 AMtodd.ginsberg
12/16/2018, 4:03 AMMarcin Wisniowski
12/16/2018, 4:04 AMMarcin Wisniowski
12/16/2018, 7:22 AMketurn
12/16/2018, 8:18 AMkarelpeeters
12/16/2018, 11:09 AMPavlo Liapota
12/16/2018, 12:22 PMgenerateSequence
for second part of Day 15:
return generateSequence(4) { it + 1 }
.map { elfAttack -> fight(inputs, elfAttack) }
.first { result -> result.beings.none { it.kind == BeingKind.ELF && !it.alive } }
.score
karelpeeters
12/16/2018, 12:37 PMgenerateSequence
!karelpeeters
12/16/2018, 7:26 PMtodd.ginsberg
12/16/2018, 9:47 PMtodd.ginsberg
12/17/2018, 12:40 AMMarcin Wisniowski
12/17/2018, 10:27 AMEdgars
12/17/2018, 5:54 PMkarelpeeters
12/17/2018, 7:41 PMJoris PZ
12/17/2018, 8:07 PMYour scientists were so preoccupied with whether or not they could, they didn’t stop to think if they should...
enum class Soil {
`+`, `.`, `#`, `~`, `|`, `x`
}
Joris PZ
12/17/2018, 8:07 PMYour scientists were so preoccupied with whether or not they could, they didn’t stop to think if they should...
enum class Soil {
`+`, `.`, `#`, `~`, `|`, `x`
}
karelpeeters
12/19/2018, 10:54 PMx
?Joris PZ
12/20/2018, 5:41 AM