From kde-commits Thu Jul 30 10:44:27 2009 From: Stephan Kulow Date: Thu, 30 Jul 2009 10:44:27 +0000 To: kde-commits Subject: KDE/kdegames/kpat/patsolve Message-Id: <1248950667.063273.18290.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=124895067212554 SVN commit 1004492 by coolo: follow the redeal logic of the original algorithm BUG: 198878 M +4 -2 grandf.cpp --- trunk/KDE/kdegames/kpat/patsolve/grandf.cpp #1004491:1004492 @@ -72,7 +72,9 @@ card = deck[--len]; int currentpile = m_redeal * 7 + i; Wp[currentpile]++; - *Wp[currentpile] = card + ( 1 << 7 ); + *Wp[currentpile] = card; + if ( i != start ) + *Wp[currentpile] += ( 1 << 7 ); Wlen[currentpile]++; } i += dir; @@ -317,7 +319,7 @@ printcard( *Wp[j], stderr ); fprintf( stderr, " allowed %d\n",allowed ); #endif - if ( allowed ) + if ( allowed ) { mp->card_index = l; mp->from = i;