Mikołaj Kąkol
12/02/2023, 7:50 AMdata class BallSet(
val red: Int,
val green: Int,
val blue: Int,
) {
companion object {
fun fromString(input: String): BallSet {
val set = input.trim().split(",")
.associate { ball -> ball.split(" ").let { it[1] to it[0].toInt() } }
return BallSet(
red = set.getOrDefault("red", 0),
green = 5,
blue = 4,
)
}
}
}
so there is 8 spaces in constructor and in following lines. Same code copied to project generated using new kotlin project generator looks good. I don’t see anything in settingsandrey.dernov
12/04/2023, 11:13 AMMikołaj Kąkol
12/04/2023, 11:35 AM