コード例 #1
0
 public void refreshCardPanels() {
   for (PlayerPanel pPanel : players) {
     pPanel.getHandPanel().refreshCardPanels();
     pPanel.getFieldPanel().refreshCardPanels();
     pPanel.getDeckPanel().refreshSize();
     pPanel.getGraveyardPanel().refreshSize();
   }
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 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;
 }