[Kde-games-devel] KPat Solver Error

Julian Helfferich julian.helfferich at googlemail.com
Sat Jan 16 15:51:24 CET 2010


Hello,

i think i found a way to recreate this bug:

1. Start Kpat, choose Klondike as the game
2. Change the game type to draw 1 / draw 3
3. Press demo

The problem is, that the solver gets no information about the changing of
the game type, so it calculates the win moves for draw 1, even if you
changed the game to draw 3 (or vice versa). The solution is as easy as
adding one line in the gameTypeChanged slot:

--- klondike.cpp    (revision 1075656)
+++ klondike.cpp    (working copy)
@@ -254,6 +254,7 @@
     if ( allowedToStartNewGame() )
     {
         setEasy( options->currentItem() == 0 );
+    setSolver( new KlondikeSolver( this, pile->draw() ) );
         startNew( gameNumber() );
     }
     else

(It doesn't create a memory leak, because setSolver cares about deleting the
old solver)

I would be glad, if somebody else could recreate the bug by using my short
instructions, testing the bugfix and (if it's working) commit it to svn.

Julian

2010/1/14 John Schneiderman wrote

> On Thursday 14 January 2010 08:43:54 Parker Coates wrote:
> > Yes that is the now infamous bug 201073 [1]. If you see this issue
> > frequently, it would really help us out if you could create a save
> > file of the game just one step before it makes an illegal move and
> > attach it to that bug report, we would be most appreciative. If you
> > could also confirm whether it happens only when playing draw 1 or draw
> > 3, that would be a big help as well.
>
> Parker,
>
> I'll certainly do that.
>
> John S.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-games-devel/attachments/20100116/8ce5a3a6/attachment.htm 


More information about the kde-games-devel mailing list