[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-games-devel
Subject:    Re: [Kde-games-devel] KPat Solver Error
From:       Julian Helfferich <julian.helfferich () googlemail ! com>
Date:       2010-01-16 14:51:24
Message-ID: 6834b9781001160651q65a8b6a2k9c0d0de35fcce7c9 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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.
>
>

[Attachment #5 (text/html)]

Hello,<br><br>i think i found a way to recreate this bug:<br><br>1. Start Kpat, \
choose Klondike as the game<br>2. Change the game type to draw 1 / draw 3<br>3. Press \
demo<br><br>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:<br> <br>--- klondike.cpp    (revision 1075656)<br>+++ \
klondike.cpp    (working copy)<br>@@ -254,6 +254,7 @@<br>     if ( \
allowedToStartNewGame() )<br>     {<br>         setEasy( options-&gt;currentItem() == \
0 );<br>+    setSolver( new KlondikeSolver( this, pile-&gt;draw() ) );<br>  startNew( \
gameNumber() );<br>     }<br>     else<br><br>(It doesn&#39;t create a memory leak, \
because setSolver cares about deleting the old solver)<br><br>I would be glad, if \
somebody else could recreate the bug by using my short instructions, testing the \
bugfix and (if it&#39;s working) commit it to svn.<br> <br>Julian<br><br><div \
class="gmail_quote">2010/1/14 John Schneiderman wrote<span \
dir="ltr"></span><br><blockquote class="gmail_quote" style="border-left: 1px solid \
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div \
class="im">On Thursday 14 January 2010 08:43:54 Parker Coates wrote:<br> &gt; Yes \
that is the now infamous bug 201073 [1]. If you see this issue<br> &gt; frequently, \
it would really help us out if you could create a save<br> &gt; file of the game just \
one step before it makes an illegal move and<br> &gt; attach it to that bug report, \
we would be most appreciative. If you<br> &gt; could also confirm whether it happens \
only when playing draw 1 or draw<br> &gt; 3, that would be a big help as well.<br>
<br>
</div>Parker,<br>
<br>
I&#39;ll certainly do that.<br>
<br>
John S.<br>
<div><div></div><div class="h5"><br></div></div></blockquote></div>



_______________________________________________
kde-games-devel mailing list
kde-games-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic