Nat Strangerweather
08/02/2022, 1:28 PMfun getWordValue() {
val lettersToValues = repository.arr.associate { it.name to it.value }
word.value!!.forEachIndexed { i, c: Char ->
if (i in 0..2) {
lettersToValues.getValue(c.toString())
} else {
lettersToValues.getValue(c.toString()) * 2
}
wordValue.value = c.toString().sumOf { i }
}
}