Skip to content

Instantly share code, notes, and snippets.

@ShelbyCohen
Created December 18, 2019 03:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShelbyCohen/1aa01a3deaba1607d304d7dbdd38762a to your computer and use it in GitHub Desktop.
Save ShelbyCohen/1aa01a3deaba1607d304d7dbdd38762a to your computer and use it in GitHub Desktop.
public override fun play(): List<Map.Entry<Int, List<String>>> {
val scoreOfALetter = { letter: Int -> flowOf(letterScores[letter - 'a'.toInt()]) }
val letterScore = { entry: Map.Entry<Int, LongWrapper> ->
flowOf(
letterScores[entry.key - 'a'.toInt()] * Integer.min(
entry.value.get().toInt(),
scrabbleAvailableLetters[entry.key - 'a'.toInt()]
)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment