Importing classes from separate files

In the nyethack code, Game.kt finds the player class in Player.kt without any need to designate where it comes from (no need to import file). How does this work? Does the compiler parse the whole source for class declarations? What are the rules and best practices for when you need to and when you don’t need an import?

Thanks for the great content. As someone coming with javascript and rails experience and zero java experience, so far the book has been great at promoting understanding!