void Pile::move_from(Pile &from, int num) { assert(num <= from.get_size()); iterator iter_from = from.cards.begin(); for (int i = 0; i < num; i++) { iter_from++; } cards.splice(cards.begin(), from.cards, from.cards.begin(), iter_from); }
void process_pile(DrawableCard *CT[DECK_SIZE], Pile &P) { static int cards_seen = 0; for (int i = P.get_size(); i > 0; i--) { cards_seen++; Card &C = P.get_card(i-1); CT[card_idx_peek(C)] = peek_drawable(C); } return; }