for(int i = 0; i < prearrivalcards.count; i++) { var card = shuffledeck(prearrivalcards[i]); if(card.patternsmatch(player.hand)) { player.pushaside(card); } else if(player.shouldbecautious(card)) { player.reawakenstrategy(); } }