[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:       2011-01-26 12:24:24
Message-ID: 20110126122424.7D3203E1F1 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1217229 by coolo:

freecell was never a game where empty piles allowed only
kings. I wonder how many games still could be solved
BUG: 230354


 M  +3 -3      freecellsolver.cpp  


--- trunk/KDE/kdegames/kpat/patsolve/freecellsolver.cpp #1217228:1217229
@@ -30,8 +30,6 @@
 static card_t Suit_mask;
 static card_t Suit_val;
 
-#define king_only(card) (RANK(card) == PS_KING)
-
 /* Statistics. */
 
 int FreecellSolver::Xparam[] = { 4, 1, 8, -1, 7, 11, 4, 2, 2, 1, 2 };
@@ -285,7 +283,7 @@
 				continue;
 			}
                         bool allowed = false;
-                        if ( i < Nwpiles && king_only(*Wp[i]) )
+                        if ( i < Nwpiles)
                             allowed = true;
                         if ( i >= Nwpiles )
                             allowed = true;
@@ -507,12 +505,14 @@
 
        fprintf(stderr, "print-layout-begin\n");
        for (w = 0; w < Nwpiles; ++w) {
+	 fprintf(stderr, "W-Pile%d: ", w);
                for (i = 0; i < Wlen[w]; ++i) {
                        printcard(W[w][i], stderr);
                }
                fputc('\n', stderr);
        }
        for (t = 0; t < Ntpiles; ++t) {
+	 fprintf(stderr, "T-Pile%d: ", t+Nwpiles);
            printcard(W[t+Nwpiles][Wlen[t+Nwpiles]], stderr);
        }
        fprintf( stderr, "\n" );
[prev in list] [next in list] [prev in thread] [next in thread] 

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