Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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!