From kde-commits Wed Jan 26 12:24:24 2011 From: Stephan Kulow Date: Wed, 26 Jan 2011 12:24:24 +0000 To: kde-commits Subject: KDE/kdegames/kpat/patsolve Message-Id: <20110126122424.7D3203E1F1 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129604473606615 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" );