forked from len0rd/rockbox
make the moving smarter so you dont have to select the top card of a column to move the whole column
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13248 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1245d0fddd
commit
77a868360f
1 changed files with 18 additions and 1 deletions
|
@ -1448,7 +1448,24 @@ int solitaire( void )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* try moving cards */
|
/* try moving cards */
|
||||||
move_card( cur_col, sel_card );
|
/* the code in the else seems to not like moveing kings
|
||||||
|
so if the selected card is a king do it the simple way */
|
||||||
|
if (deck[sel_card].num == CARDS_PER_SUIT - 1)
|
||||||
|
{
|
||||||
|
if (move_card( cur_col, sel_card ) == MOVE_NOT_OK)
|
||||||
|
sel_card = NOT_A_CARD;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int retval;
|
||||||
|
do {
|
||||||
|
retval = move_card( cur_col, sel_card );
|
||||||
|
if (retval == MOVE_NOT_OK)
|
||||||
|
{
|
||||||
|
sel_card = find_prev_card(sel_card);
|
||||||
|
}
|
||||||
|
} while ((retval == MOVE_NOT_OK) && (sel_card != NOT_A_CARD));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue