- Simplified the code found in forge.gui.game.cardDetailPanel and forge.AllZoneUtil.

This commit is contained in:
jendave
2011-08-07 01:02:00 +00:00
parent 59023c48c6
commit 360a2f217c
2 changed files with 3 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ public class AllZoneUtil {
CardList list = getCreaturesInPlay(); CardList list = getCreaturesInPlay();
list = list.filter(new CardListFilter() { list = list.filter(new CardListFilter() {
public boolean addCard(Card c) { public boolean addCard(Card c) {
return c.getKeyword().contains(keyword); return c.hasKeyword(keyword);
} }
}); });
return list; return list;
@@ -760,7 +760,7 @@ public class AllZoneUtil {
public static CardListFilter getKeywordFilter(final String keyword) { public static CardListFilter getKeywordFilter(final String keyword) {
CardListFilter filter = new CardListFilter() { CardListFilter filter = new CardListFilter() {
public boolean addCard(Card c) { public boolean addCard(Card c) {
return c.getKeyword().contains(keyword); return c.hasKeyword(keyword);
} }
}; };
return filter; return filter;

View File

@@ -225,7 +225,7 @@ public class CardDetailPanel extends JPanel implements CardContainer {
} }
//top revealed //top revealed
if (card.getKeyword().contains("Play with the top card of your library revealed.") if (card.hasKeyword("Play with the top card of your library revealed.")
&& !card.getTopCardName().equals("")) && !card.getTopCardName().equals(""))
{ {
area.append("\r\nTop card: "); area.append("\r\nTop card: ");