[Kde-games-devel] kpat - BugFix

Peter H. Ruegg kde-games-devel@mail.kde.org
Sun, 3 Nov 2002 19:00:59 +0100 (MET)


Hi there,

I noticed a small problem in several kpat-Games: When starting a new game,
the autodrop feature will only work for one card - if there are several more
that could be autodropped, you'll need to dobule-click them. The following
patch fixes this, I hope it can be applied.

Greets


Peter

--8<-------------------------------------------------------------------------
main(){char*s="O_>>^PQAHBbPQAHBbPOOH^^PAAHBJPAAHBbPA_H>BB";int i,j,k=1,l,m,n;
for(j=0;j<7;j++)for(l=0;m=l-6+j,i=m/6,n=j*6+i,k=1<<m%6,l<41-j;l++)
putchar(l<6-j?' ':l==40-j?'\n':k&&s[n]&k?'*':' ');}



--- dealer.cpp	Mon Oct 21 11:43:10 2002
+++ dealer2.cpp	Mon Oct 21 11:45:15 2002
@@ -757,10 +757,10 @@
         else if (isGameLost()) {
             QTimer::singleShot(400, this, SIGNAL(gameLost()));
             return;
-        } else if (!demoActive() && !waiting()) {
-            QTimer::singleShot(TIME_BETWEEN_MOVES, this, SLOT(startAutoDrop()));
         }
     }
+    if (!demoActive() && !waiting())
+            QTimer::singleShot(TIME_BETWEEN_MOVES, this, SLOT(startAutoDrop()));
     emit undoPossible(undoList.count() > 1 && !waiting());
 }