fixed some ConcurrentModificationException's

This commit is contained in:
betasteward 2014-11-08 23:41:32 -05:00
parent 4ce652efe5
commit 075ce81e1d
3 changed files with 6 additions and 12 deletions

View file

@ -100,9 +100,7 @@ class WhirlpoolSDrakeTriggeredEffect extends OneShotEffect {
if (controller != null) {
int cardsHand = controller.getHand().size();
if (cardsHand > 0){
Cards cards = controller.getHand();
for (UUID cardId: cards) {
Card card = game.getCard(cardId);
for (Card card: controller.getHand().getCards(game)) {
if (card != null) {
controller.removeFromHand(card, game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);

View file

@ -102,9 +102,7 @@ class WhirlpoolWarriorTriggeredEffect extends OneShotEffect {
if (controller != null) {
int cardsHand = controller.getHand().size();
if (cardsHand > 0){
Cards cards = controller.getHand();
for (UUID cardId: cards) {
Card card = game.getCard(cardId);
for (Card card: controller.getHand().getCards(game)) {
if (card != null) {
controller.removeFromHand(card, game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
@ -145,10 +143,9 @@ class WhirlpoolWarriorActivatedEffect extends OneShotEffect {
if (player != null) {
int cardsHand = player.getHand().size();
if (cardsHand > 0){
for (UUID cardId: player.getHand()) {
Card card = game.getCard(cardId);
for (Card card: player.getHand().getCards(game)) {
if (card != null) {
player.removeFromHand(card, game);
player.removeFromHand(card, game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
}
}

View file

@ -90,10 +90,9 @@ class MoltenPsycheEffect extends OneShotEffect {
Player player = game.getPlayer(playerId);
if (player != null) {
int count = player.getHand().size();
for (UUID cardId: player.getHand()) {
Card card = game.getCard(cardId);
for (Card card: player.getHand().getCards(game)) {
if (card != null) {
player.removeFromHand(card, game);
player.removeFromHand(card, game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
}
}