Spider Solitaire Augmentation
August 21st, 2007
I found another spider solitaire bug, which is similar to the bug I found previously in this card game. When pressing the “new card” button, AKA the stack, I get a null pointer exception, because the ten bottom-most cards in the tableau are not all present in the active_cards array. This is especially baffling, because I thought the problem had been caused by another bug that I had just fixed in spider solitaire. I’m currently in the process of debugging this little mystery, in the hopes that pretty soon I’ll have an entirely bug-free version of spider solitaire out there for all you gamers to play. The plan is to trace the bottom-most card in the layout, so that it will be printed to the screen just before the error occurs next time. This should provide me with insight as to what’s wrong. I think the major problem is that this version of solitaire, spider solitaire, uses a pointer-card to keep track of cards that aren’t necessarily stacked incrementally.
As it turned out, when building down a stack of cards in the tableau of this card game, you had to not move a stack of more than 1 card. If the card was a cascade, placed atop another card—so that the entire cascade was built-down to remove it from the game—an error would occur. This card game only allowed cascade removal of cards when you built down with only one card. I fixed this issue, making spider solitaire safe to play!