Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Kotlin and Anko Adding the UI Solitaire

cards from deck added at multiple positions

When there are more than 1 position possible for a card to move from deck to tableau, it gets added at all the positions. This should not happen. As soon as a position is found, we return true.

1 Answer

Resolved! There should be aa return statement as soon as new card is added from waste pile. (At line 37 in GameModel- https://github.com/treehouse/Solitaire/blob/master/app/src/main/java/com/teamtreehouse/solitaire/no_android/GameModel.kt )