Bug 51078 - Incorrect hint showing "You can't win this game" in Mod3
Summary: Incorrect hint showing "You can't win this game" in Mod3
Status: RESOLVED FIXED
Alias: None
Product: kpat
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-23 03:33 UTC by Marco Wegner
Modified: 2002-12-22 17:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Wegner 2002-11-23 03:33:00 UTC
Version:           2.0 (using KDE 3.1.0 (KDE 3.1 RC4))
Installed from:    compiled sources
Compiler:          gcc version 3.2.1
OS:          Linux (i686) release 2.4.0-4GB

When playing for instance game #22708 in Mod3 then you will be told right away that you've lost the game although you can still play by moving the aces away.
Comment 1 Stephan Kulow 2002-12-22 17:54:32 UTC
Subject: KDE_3_1_BRANCH: kdegames/kpat

CVS commit by coolo: 

take aces into account for isGameLost
CCMAIL: 51078-close@bugs.kde.org


  M +1 -1      mod3.cpp   1.38.2.1


--- kdegames/kpat/mod3.cpp  #1.38:1.38.2.1
@@ -181,5 +181,5 @@ bool Mod3::isGameLost() const {
             break;
         }
-        if(stack[r][c]->at(0)->value() == (Card::Two +r)){
+        if(stack[r][c]->at(0)->value() == (Card::Two +r) || stack[r][c]->at(0)->value() == Card::Ace) {
             nextTest=true;
             break;