Created
December 18, 2019 03:52
-
-
Save ShelbyCohen/6078c5690ae9a307d290940625fdad03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override fun play(): List<Map.Entry<Int, List<String>>> { | |
val scoreOfALetter = Function<Int, Flux<Int>> { letter -> Flux.just(letterScores[letter - 'a'.toInt()]) } | |
val letterScore = Function<Map.Entry<Int, LongWrapper>, Flux<Int>> { entry -> | |
Flux.just( | |
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