This year I want to improve my kotlin skills. Explore new language feature, revisited concepts I already use, ...
What did I learn so far?
- project setup of a simple kotlin project
com.willowtreeapps.assertk:assertk-jvm:0.25
is the lib I use for unit tests all the time at work. Needed to import it.- Array methods:
copyRanged
andmapIndexed
- I like
String#trimMargin()
to format input strings nicely in the tests.
- Feels like a dirty solution :) Probably should have used some kind of bitwise-operator or so.
- I liked the recursive part.
boardsLines.windowed(size = 6, step = 6)
is a nice way to "slide" over a list with a given window size- Longest time was building the data structure for holding results and the boards.
- learnt what Hydrothermal vents are
- Took time to read about the Ranges in kotlin and its different operators e.g.
..
,until
,downTo
,step