コード例 #1
0
 CardCollection setCards(CardCollection oldCards, CardCollection newCards, TrackableProperty key) {
   if (newCards == null || newCards.isEmpty()) { // avoid storing empty collections
     set(key, null);
     return null;
   }
   set(key, CardView.getCollection(newCards)); // TODO prevent overwriting list if not necessary
   return newCards;
 }
コード例 #2
0
 void updateTargetCards(SpellAbilityStackInstance si) {
   set(
       TrackableProperty.TargetCards,
       CardView.getCollection(si.getTargetChoices().getTargetCards()));
 }