Closed tunjid closed 3 years ago
Yes, this is a more idiomatic approach. Did you want to update this PR with your suggested changes?
@dturner I should use the let
method over the extra declared variable?
Sorry, I should've been clearer. Yes the let
method is much clearer. Also, regarding the first method, I would avoid any variable which includes type information in its name e.g. nullablePlayer
since the nullability is inferred from its type.
Would it be possible to merge all these PRs into a single PR? At the moment it's difficult to see exactly what's changed from the original.
@dturner will do!
Closing in favor of #63
Updates the kotlin to be more idiomatic (gets rid of the !! force null unwrapping mostly).
I favored more descriptive variable names over more idiomatic lambdas for beginner accessibility.
For example:
versus
Let me know what you think.