From 375991c24c2c7d032c9c4432ceed313ec51343f2 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 04:09:16 +0000 Subject: [PATCH] remove old code and add javadoc for new functions. --- src/forge/AllZoneUtil.java | 13 ++++++++++++- src/forge/GameActionUtil.java | 11 ----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/forge/AllZoneUtil.java b/src/forge/AllZoneUtil.java index 37d5665a3af..830776a5e38 100644 --- a/src/forge/AllZoneUtil.java +++ b/src/forge/AllZoneUtil.java @@ -234,13 +234,24 @@ public class AllZoneUtil { ///get a list of certain types are in play (like Mountain, Elf, etc...) - + /** + * gets a list of all cards with a certain type (Mountain, Elf, etc...) in play + * + * @param the type to find in play + * @return a CardList with all cards of the given type in play + */ public static CardList getTypeInPlay(final String cardType) { CardList cards = getCardsInPlay(); cards = cards.getType(cardType); return cards; } + /** + * gets a list of all cards of a certain type that a given player has in play + * @param player the player to check for cards in play + * @param cardType the card type to check for + * @return a CardList with all cards of a certain type the player has in play + */ public static CardList getPlayerTypeInPlay(final String player, final String cardType) { CardList cards = getPlayerCardsInPlay(player); cards = cards.getType(cardType); diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index b8c4a20749e..e578a9c81d6 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -10850,11 +10850,6 @@ public class GameActionUtil { private static final long serialVersionUID = -220650457326100804L; public void execute() { - // get all creatures - /*CardList list = new CardList(); - list.addAll(AllZone.Human_Play.getCards()); - list.addAll(AllZone.Computer_Play.getCards()); - list = list.getName("Heedless One"); */ CardList list = AllZoneUtil.getCardsInPlay("Heedless One"); for(int i = 0; i < list.size(); i++) { @@ -10862,14 +10857,9 @@ public class GameActionUtil { c.setBaseAttack(countElves(c)); c.setBaseDefense(countElves(c)); } - }// execute() private int countElves(Card c) { - /*PlayerZone play = AllZone.getZone(Constant.Zone.Play, c.getController()); - CardList elves = new CardList(play.getCards()); - elves = elves.getType("Elf"); - return elves.size();*/ return AllZoneUtil.getTypeInPlay("Elf").size(); } }; @@ -11074,7 +11064,6 @@ public class GameActionUtil { c.setBaseDefense(1); } } - }// execute() private boolean hasThreeLevels(Card c) {