Bug 192721 - grandfather's clock solver doesn't understand empty piles
Summary: grandfather's clock solver doesn't understand empty piles
Status: RESOLVED FIXED
Alias: None
Product: kpat
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-15 00:31 UTC by Matthew Woehlke
Modified: 2009-07-30 13:07 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
example of confused solver (3.17 KB, application/xml)
2009-05-15 00:35 UTC, Matthew Woehlke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Woehlke 2009-05-15 00:31:57 UTC
Version:            (using Devel)
Installed from:    Compiled sources

The solver for Grandfather's Clock will report games as unwinnable if there is a progression of cards in a pile that cannot be moved to the foundations in their current order. However, this is wrong since cards can be re-ordered using empty piles. (Example to follow...)
Comment 1 Matthew Woehlke 2009-05-15 00:35:55 UTC
Created attachment 33671 [details]
example of confused solver

In this example, the game is winnable, and is considered so by the solver upon load. However, moving the two of hearts to the foundation causes the solver to incorrectly label the game "not winnable in its current state". The problem seems to be that the solver is not considering moving cards from the third pile onto empty piles (which is needed to complete the game).

I've reproduced this several times with different game numbers where similar circumstances are obtained.
Comment 2 Matthew Woehlke 2009-05-15 00:38:42 UTC
Another example saved game can be found here:
http://lists.kde.org/?l=kde-games-devel&m=124179984600865&q=p3

Also see <http://permalink.gmane.org/gmane.comp.kde.devel.games/5675>.
Comment 3 Stephan Kulow 2009-07-30 12:56:00 UTC
interestingly enough the demo will first reorder the cards and _then_ move to foundation :)
Comment 4 Stephan Kulow 2009-07-30 13:07:40 UTC
SVN commit 1004499 by coolo:

funny bug - easy fix
BUG: 192721


 M  +0 -4      clock.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1004499