예제 #1
0
 /**
  * Finds the CardButtons for all selected cards and sets them to be selected.
  *
  * @param player the player whose turn it is
  * @param playable list of all hands that can be used to make the selection
  * @param selected the CardCollection of all selected cards
  */
 public void showSelectedCardSprites(Player player, List<Hand> playable, CardCollection selected) {
   for (Hand hand : playable) {
     for (Card card : hand.getCards()) {
       getOrCreateCardButton(card).selectCard(selected.contains(card));
     }
   }
 }
예제 #2
0
 /**
  * Enables all CardButtons that are usable by the player.
  *
  * @param player the player whose turn it is
  * @param playable list of all hands that can be used to make the selection
  */
 public void enablePlayableCardSprites(Player player, List<Hand> playable) {
   for (Hand hand : playable) {
     setSpritesEnabled(hand.getCards(), canUseCards(player, hand));
   }
 }
예제 #3
0
 /**
  * Turns all cards face up that are visible to the player.
  *
  * @param player the player whose turn it is
  * @param playable list of all hands that can be used to make the selection
  */
 public void showVisibleCardSprites(Player player, List<Hand> playable) {
   for (Hand hand : playable) {
     setSpritesFaceUp(hand.getCards(), canSeeCards(player, hand));
   }
 }