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 for Java Developers Is This Thing On? It's Alive!

Raúl Dorado Pulido
Raúl Dorado Pulido
483 Points

Error running test

Howdy! i've trying tu run the test, but i got this state somehow few times, and it's obviously wrong, since i got a K, but it is like there is no cards left, but the kings are not in the foundation piles.

___ K ♣ Q ♦ Q ♥ Q ♠

Games: 8277

This example is when the test is run successfully.

Now, also, other times i get errors of assertion, being this one instance of a example (the number of cards in every pile depends each time, obviously):

8 ♠ ___ ___ 2 ♥ ___

9 ♠ J ♥ Q ♣ 2 ♠ 6 ♥ 4 ♣ A ♦
8 ♦ 8 ♣ 6 ♦ 10♠ A ♠ K ♣
7 ♠ 7 ♥ 5 ♣ 3 ♥ A ♣ 10♥
6 ♠ 4 ♦ Q ♥ 8 ♥ 10♣
5 ♦ 3 ♣ 5 ♥ K ♠ 7 ♣
2 ♦ 4 ♠ 4 ♥ J ♣
3 ♦ 3 ♠ 5 ♠
2 ♣

Games: 10000

java.lang.AssertionError: Assertion failed

I dont know if these results are just fine or there is some errors, i dont have the feeling that everything is working fine, honestly., specially with the K Q Q Q problem, it's always the same unique good result and it is defined to be something like that, but where are the other Ks??

Thanks in advice!