[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-27 11:13:33
Message-ID: 1214565213.752176.12880.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 825079 by coolo:

some more prios


 M  +19 -13    gypsy.cpp  


--- trunk/KDE/kdegames/kpat/patsolve/gypsy.cpp #825078:825079
@@ -280,18 +280,24 @@
                     }
                 }
 
-                if ( allowed ) {
-                    mp->card_index = l;
-                    mp->from = i;
-                    mp->to = j;
-                    mp->totype = W_Type;
-                    mp->turn_index = -1;
-                    if ( Wlen[i] > l+1 && DOWN( W[i][Wlen[i]-l-2] ) )
-                        mp->turn_index = 1;
-                    mp->pri = 8;
-                    n++;
-                    mp++;
-                }
+                if ( !allowed )
+                    continue;
+
+                mp->card_index = l;
+                mp->from = i;
+                mp->to = j;
+                mp->totype = W_Type;
+                mp->turn_index = -1;
+                if ( Wlen[i] > l+1 && DOWN( W[i][Wlen[i]-l-2] ) )
+                    mp->turn_index = 1;
+                if ( mp->turn_index > 0 )
+                    mp->pri = 126;
+                else
+                    mp->pri = 20;
+                if ( Wlen[i] > l && RANK( card ) == RANK( W[i][Wlen[i]-2-l] ) - 1 )
+                    mp->pri = 0; // continue;
+                n++;
+                mp++;
             }
         }
     }
@@ -303,7 +309,7 @@
         mp->from = deck;
         mp->to = 0; // unused
         mp->totype = W_Type;
-        mp->pri = 0;
+        mp->pri = 1;
         mp->turn_index = -1;
         n++;
         mp++;
[prev in list] [next in list] [prev in thread] [next in thread] 

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