Kotlin and Android Development featuring Jetpack: Treating method as a Property (Page 111)

Hey Mike!
You’re correct that selectedAI() in NewPlayer is a function, but it’s a property inside Player, which is the class referenced in the playAITurn() function.

NewPlayer calculates the AI, Player takes that value to be used later.

Hope this helps!