diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/solitaire.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index da6ca3c74e..a73e2c02ed 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c | |||
@@ -1448,7 +1448,24 @@ int solitaire( void ) | |||
1448 | else | 1448 | else |
1449 | { | 1449 | { |
1450 | /* try moving cards */ | 1450 | /* try moving cards */ |
1451 | move_card( cur_col, sel_card ); | 1451 | /* the code in the else seems to not like moveing kings |
1452 | so if the selected card is a king do it the simple way */ | ||
1453 | if (deck[sel_card].num == CARDS_PER_SUIT - 1) | ||
1454 | { | ||
1455 | if (move_card( cur_col, sel_card ) == MOVE_NOT_OK) | ||
1456 | sel_card = NOT_A_CARD; | ||
1457 | } | ||
1458 | else | ||
1459 | { | ||
1460 | int retval; | ||
1461 | do { | ||
1462 | retval = move_card( cur_col, sel_card ); | ||
1463 | if (retval == MOVE_NOT_OK) | ||
1464 | { | ||
1465 | sel_card = find_prev_card(sel_card); | ||
1466 | } | ||
1467 | } while ((retval == MOVE_NOT_OK) && (sel_card != NOT_A_CARD)); | ||
1468 | } | ||
1452 | } | 1469 | } |
1453 | break; | 1470 | break; |
1454 | 1471 | ||