added new helper methods to test for CardType, to get rid of the contains(CardType.XXX) everywhere, put the logic of that in one place and use the interface call

This commit is contained in:
ingmargoudt 2017-03-04 00:16:36 +01:00
parent 6b20d352ca
commit 5a57731968
69 changed files with 151 additions and 120 deletions

View file

@ -76,7 +76,7 @@ public class HideawayPlayEffect extends OneShotEffect {
* If the removed card is a land, you may play it as a result of the last ability only if it's your turn
* and you haven't already played a land that turn. This counts as your land play for the turn.
*/
if (card.getCardType().contains(CardType.LAND)) {
if (card.isLand()) {
UUID playerId = controller.getId();
if (!game.getActivePlayerId().equals(playerId) || !game.getPlayer(playerId).canPlayLand()) {
return false;