Bug 145953

Summary: "Allow unsolvable games" check box or engine is broken
Product: [Applications] kshisen Reporter: Rick Archibald <rick>
Component: generalAssignee: Mauricio Piacentini <piacentini>
Status: RESOLVED FIXED    
Severity: normal CC: plantasbaja, purslow
Priority: NOR    
Version: 1.5.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Rick Archibald 2007-05-25 15:53:36 UTC
Version:           1.5.1 (using KDE KDE 3.5.5)
Installed from:    Ubuntu Packages
OS:                Linux

When the "Allow unsolvable games" box (in the "Configure - Shisen-Sho" dialog) is not checked, which should disallow unsolvable games, unsolvable games do occur -- I have a screen shot of at least one.   It has a pattern of  mutual blocking like this:  
........
...XO...
...OX...
........
where "X" & "O" are pairs (not members of n-tuples) and had no other matches at the beginning of the game (Tile Size: 14x6 ==> 84 tile game, pairs & quadruples only).  
  
On the other hand, after I checked the box I have yet to encounter an unsolvable game.  
  
So, either the engine that determines solveability is broken; or, more likely, the labelling on the box is logically reversed.
Comment 1 Rick Archibald 2007-05-25 16:13:43 UTC
This is similar to, possibly related to; but not the same as:   
Bug 14175: unsolvable games are solvable  [CLOSED]  
  
BTW, the fact that the Handbook confirms the mis-labelling:   
"If checked, only solvable games will be created when a new game is started. Note: You may still choose the wrong way and have to try again if you didn't solve the game, but if it's checked, the game will be solvable."
is no excuse for it.
Comment 2 Dmitry Suzdalev 2008-01-12 18:08:04 UTC
Reassigning to the current maintainer
Comment 3 Mauricio Piacentini 2008-01-13 00:45:46 UTC
Appears to still be present in 4.0, under investigation
Comment 4 Philip Webb 2009-12-08 10:16:41 UTC
I've been playing Kshisen 4.3.1 a lot recently & my observation is that there are  2  things wrong: (1) 'allow unsolvable games' has its values reversed, ie if you say 'yes' there are no clearly unsolvable games, but if you say 'no' you can run into games which reach a stalemate a few simple moves after the start:
this may be a simple error by the programmer, which could be solved by inspecting the code & seeing which values actually do what; (2) the  3  settings for 'easy/medium/difficult' have no noticeable effect: was this overlooked or left for later by the programmer ?  BTW I don't use gravity & play 18 x 8 .
Comment 5 Frederik Schwarzer 2010-10-01 22:02:36 UTC
*** Bug 252914 has been marked as a duplicate of this bug. ***
Comment 6 Frederik Schwarzer 2010-10-01 22:38:29 UTC
SVN commit 1181702 by schwarzer:

fix logical error

Checking this option ensures that the created games are solvable.
The option label was wrong. I could have kept the lebel and
adjusted the code accordingly but I decided to keept the code and
switch the meaning of the label, since it makes more sense
this way.

Thanks to all the reporters for analysing this. :)

BUG: 145953


 M  +2 -2      settings.ui  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1181702
Comment 7 plantasbaja 2010-10-01 23:43:49 UTC
i'm 2 for 2 and it seems ok now, thanks.

--- On Fri, 10/1/10, Frederik Schwarzer <schwarzerf@gmail.com> wrote:

From: Frederik Schwarzer <schwarzerf@gmail.com>
Subject: [Bug 145953] "Allow unsolvable games" check box or engine is broken
To: plantasbaja@yahoo.com
Date: Friday, October 1, 2010, 1:38 PM

https://bugs.kde.org/show_bug.cgi?id=145953


Frederik Schwarzer <schwarzerf@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED




--- Comment #6 from Frederik Schwarzer <schwarzerf gmail com>  2010-10-01 22:38:29 ---
SVN commit 1181702 by schwarzer:

fix logical error

Checking this option ensures that the created games are solvable.
The option label was wrong. I could have kept the lebel and
adjusted the code accordingly but I decided to keept the code and
switch the meaning of the label, since it makes more sense
this way.

Thanks to all the reporters for analysing this. :)

BUG: 145953


 M  +2 -2      settings.ui  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1181702
Comment 8 Frederik Schwarzer 2010-10-03 13:48:50 UTC
SVN commit 1182109 by schwarzer:

fix logical error

Checking this option ensures that the created games are solvable.
The option label was wrong. I could have kept the label and
adjusted the code accordingly but I decided to keep the code and
switch the meaning of the label, since it makes more sense
this way.

backport of r1181702, r1181704, r1181709, r1181811 and r1181819

CCBUG: 145953

 M  +0 -3      app.cpp  
 M  +2 -2      board.cpp  
 M  +4 -4      board.h  
 M  +1 -1      kshisen.kcfg  
 M  +2 -2      settings.ui  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1182109
Comment 9 plantasbaja 2010-10-03 16:50:38 UTC
thank you frederik

--- On Sun, 10/3/10, Frederik Schwarzer <schwarzerf@gmail.com> wrote:

From: Frederik Schwarzer <schwarzerf@gmail.com>
Subject: [Bug 145953] "Allow unsolvable games" check box or engine is broken
To: plantasbaja@yahoo.com
Date: Sunday, October 3, 2010, 4:49 AM

https://bugs.kde.org/show_bug.cgi?id=145953





--- Comment #8 from Frederik Schwarzer <schwarzerf gmail com>  2010-10-03 13:48:50 ---
SVN commit 1182109 by schwarzer:

fix logical error

Checking this option ensures that the created games are solvable.
The option label was wrong. I could have kept the label and
adjusted the code accordingly but I decided to keep the code and
switch the meaning of the label, since it makes more sense
this way.

backport of r1181702, r1181704, r1181709, r1181811 and r1181819

CCBUG: 145953

 M  +0 -3      app.cpp  
 M  +2 -2      board.cpp  
 M  +4 -4      board.h  
 M  +1 -1      kshisen.kcfg  
 M  +2 -2      settings.ui  


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