Changeset View
Changeset View
Standalone View
Standalone View
patsolve/gypsysolver.cpp
Show First 20 Lines • Show All 532 Lines • ▼ Show 20 Line(s) | 531 | { | |||
---|---|---|---|---|---|
533 | if ( m.from == deck ) | 533 | if ( m.from == deck ) | ||
534 | return MoveHint(); | 534 | return MoveHint(); | ||
535 | 535 | | |||
536 | PatPile *frompile = deal->store[m.from]; | 536 | PatPile *frompile = deal->store[m.from]; | ||
537 | KCard *card = frompile->at( frompile->count() - m.card_index - 1); | 537 | KCard *card = frompile->at( frompile->count() - m.card_index - 1); | ||
538 | 538 | | |||
539 | if ( m.totype == O_Type ) | 539 | if ( m.totype == O_Type ) | ||
540 | { | 540 | { | ||
541 | PatPile *target = 0; | 541 | PatPile *target = nullptr; | ||
542 | PatPile *empty = 0; | 542 | PatPile *empty = nullptr; | ||
543 | for (int i = 0; i < 8; ++i) { | 543 | for (int i = 0; i < 8; ++i) { | ||
544 | KCard *c = deal->target[i]->topCard(); | 544 | KCard *c = deal->target[i]->topCard(); | ||
545 | if (c) { | 545 | if (c) { | ||
546 | if ( c->suit() == card->suit() && c->rank() == card->rank() - 1) | 546 | if ( c->suit() == card->suit() && c->rank() == card->rank() - 1) | ||
547 | { | 547 | { | ||
548 | target = deal->target[i]; | 548 | target = deal->target[i]; | ||
549 | break; | 549 | break; | ||
550 | } | 550 | } | ||
Show All 10 Lines |