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

List:       kde-commits
Subject:    KDE/kdegames/kpat/patsolve
From:       Stephan Kulow <coolo () kde ! org>
Date:       2008-06-26 11:09:44
Message-ID: 1214478584.202072.13194.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 824620 by coolo:

I can't hear her saying "I just won and he said I would loose"
anymore - eat this!


 M  +8 -4      gypsy.cpp  


--- trunk/KDE/kdegames/kpat/patsolve/gypsy.cpp #824619:824620
@@ -93,7 +93,7 @@
 
     if (m->totype == O_Type) {
         if ( Wlen[to] )
-            *Wp[to]++;
+            *Wp[to] = card;
         else {
             Wp[to]++;
             Wlen[to]++;
@@ -160,8 +160,12 @@
 
     if (m->totype == O_Type) {
         card = *Wp[to];
-        Wp[to]--;
-        Wlen[to]--;
+        if ( RANK( card ) == PS_ACE )
+        {
+            Wlen[to] = 0;
+        } else {
+            *Wp[to] = card - 1; // SUIT( card ) << 4 + RANK( card ) - 1;
+        }
         Wp[from]++;
         *Wp[from] = card;
         Wlen[from]++;
@@ -318,7 +322,7 @@
     // maybe won?
     for (int o = 0; o < 8; o++)
     {
-        if (Wlen[outs + o] == 0 || RANK( *Wp[outs + o] ) != PS_ACE )
+        if ( ( Wlen[outs + o] == 0 ) || ( RANK( *Wp[outs + o] ) != PS_KING ) )
             return false;
     }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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