public void refreshCardPanels() { for (PlayerPanel pPanel : players) { pPanel.getHandPanel().refreshCardPanels(); pPanel.getFieldPanel().refreshCardPanels(); pPanel.getDeckPanel().refreshSize(); pPanel.getGraveyardPanel().refreshSize(); } }
public List<CardPanel> getCreaturePanelsOnFields(List<CreatureCard> creatures) { List<CardPanel> creaturePanels = new LinkedList<CardPanel>(); List<Card> cardSearch = new LinkedList<Card>(); cardSearch.addAll(creatures); for (PlayerPanel pPanel : players) { creaturePanels.addAll(pPanel.getFieldPanel().getCardPanels(cardSearch)); } return creaturePanels; }
public CardPanel getCardPanelForCard(Card card) { CardPanel found = null; Iterator<PlayerPanel> playerPanelIt = players.iterator(); while (playerPanelIt.hasNext() && found == null) { PlayerPanel pPanel = playerPanelIt.next(); CardZonePanel panel = pPanel.getHandPanel(); found = panel.getCardPanelForCard(card); if (found == null) { panel = pPanel.getFieldPanel(); found = panel.getCardPanelForCard(card); } } return found; }
public CardZonePanel getCardZonePanelForCardZone(CardZone zone) { CardZonePanel found = null; Iterator<PlayerPanel> playerPanelIt = players.iterator(); while (playerPanelIt.hasNext() && found == null) { PlayerPanel pPanel = playerPanelIt.next(); CardZonePanel panel = pPanel.getHandPanel(); if (panel.getCardZone().equals(zone)) found = panel; else { panel = pPanel.getFieldPanel(); if (panel.getCardZone().equals(zone)) found = panel; } } return found; }