Changeset View
Changeset View
Standalone View
Standalone View
freecell.cpp
| Show First 20 Lines • Show All 171 Lines • ▼ Show 20 Line(s) | |||||
| 172 | { | 172 | { | ||
| 173 | // target move | 173 | // target move | ||
| 174 | if (DealerScene::tryAutomaticMove(c)) | 174 | if (DealerScene::tryAutomaticMove(c)) | ||
| 175 | return true; | 175 | return true; | ||
| 176 | 176 | | |||
| 177 | if (c->isAnimated()) | 177 | if (c->isAnimated()) | ||
| 178 | return false; | 178 | return false; | ||
| 179 | 179 | | |||
| 180 | if (allowedToRemove(c->pile(), c)) | 180 | if (allowedToRemove(c->pile(), c) | ||
| 181 | && c == c->pile()->topCard()) | ||||
| 181 | { | 182 | { | ||
| 182 | for (int i = 0; i < 4; i++) | 183 | for (int i = 0; i < 4; i++) | ||
| 183 | { | 184 | { | ||
| 184 | if (allowedToAdd( freecell[i], {c} )) | 185 | if (allowedToAdd( freecell[i], {c} )) | ||
| 185 | { | 186 | { | ||
| 186 | moveCardToPile( c, freecell[i], DURATION_MOVE ); | 187 | moveCardToPile( c, freecell[i], DURATION_MOVE ); | ||
| 187 | return true; | 188 | return true; | ||
| 188 | } | 189 | } | ||
| ▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines | |||||