public Card dealCard() {
      if (cardsUsed == deck.length)
         throw new IllegalStateException("No cards are left in the deck.");
      cardsUsed++;
      return deck[cardsUsed - 1];
      // Programming note:  Cards are not literally removed from the array
      // that represents the deck.  We just keep track of how many cards
      // have been used.
   }