Adding new game to KPat – trying to figure out crashing bug

Albert Astals Cid aacid at kde.org
Sat Oct 13 10:34:05 BST 2018


El divendres, 12 d’octubre de 2018, a les 19:35:38 CEST, Karl Ove Hufthammer va escriure:
> Hi, KDE game developers,
> 
> I’m trying to add a new solitaire variant to KPat, based on the old 
> Windows game Midnight Sunitaire. I don’t know if it has a chance to ever 
> be accepted in the *official* release (for one, it doesn’t have a 
> solver), but I find it fun to play.
> 
> I have gotten it to a state where it seems to work fine, except for one, 
> quite severe, bug. If I press the ‘Demo’ button, KPat tries to solve the 
> game. But when it runs out of legal moves to make, KPat just crashes.
> 
> My initial guess for reason for the crash was that I hadn’t implemented 
> a solver. KPat then seems to just pick random(?) valid moves. But I have 
> tried *removing* the solver for other games, and KPat does *not* crash 
> for these games when it runs out of valid moves; the demo just stops.
> 
> I have examined my code, but haven’t be able to figure out the reason 
> for the crash. I can’t see any significant difference between the 
> implementation of my new solitaire variant and the other solitaire 
> variants in KPat. Are there any developers here willing to take a look? 
> I can upload the source code (e.g. to Phabricator).

Sure, hopefully we can figure out what's wrong :)

Cheers,
  Albert

> 
> 
> Regards,
> Karl Ove Hufthammer
> 






More information about the kde-games-devel mailing list