From ee2df73bd5fbb7537b099b604b0440cb8adb496b Mon Sep 17 00:00:00 2001 From: Maxmtg Date: Thu, 21 Mar 2013 16:02:53 +0000 Subject: [PATCH] small refactoring - will use original side and perform no action if asked for other face of a different card (not transform, nor flip) instead of throwing exception --- src/main/java/forge/gui/match/controllers/CPicture.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/forge/gui/match/controllers/CPicture.java b/src/main/java/forge/gui/match/controllers/CPicture.java index 8c3dd28b81f..57bc92ca40e 100644 --- a/src/main/java/forge/gui/match/controllers/CPicture.java +++ b/src/main/java/forge/gui/match/controllers/CPicture.java @@ -93,20 +93,16 @@ public enum CPicture implements ICDoc { flipped = !flipped; - final CardCharacteristicName newState; + CardCharacteristicName newState = CardCharacteristicName.Original; if (flipped) { if (currentCard.isDoubleFaced()) { newState = CardCharacteristicName.Transformed; } else if (currentCard.isFlipCard()) { newState = CardCharacteristicName.Flipped; - } else { - throw new RuntimeException("unhandled flippable card"); } - } else { - newState = CardCharacteristicName.Original; } - CardCharacteristicName oldState = currentCard.getCurState(); + final CardCharacteristicName oldState = currentCard.getCurState(); if (oldState != newState) { currentCard.setState(newState); }