Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2020
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. package model.card;
  2.  
  3. /**
  4. * This interface is used to represent a deck of card and should be implemented
  5. * by the concrete class {@link model.card.DeckImpl}
  6. *
  7. * <p>
  8. * <b>Note: </b>{@link model.card.DeckImpl} includes some static methods not
  9. * defined by this interface.
  10. *
  11. * @author Ross Nye
  12. *
  13. * @see model.card.DeckImpl
  14. * @see model.card.Card
  15. * @see model.card.Suit
  16. * @see model.card.Rank
  17. *
  18. */
  19. /**
  20. * @author Ross
  21. *
  22. */
  23. public interface Deck
  24. {
  25. public final static int TOTAL_NUM_CARDS = Rank.values().length * Suit.values().length;
  26.  
  27. /**
  28. * Removes a card from the deck and returns the card to caller
  29. *
  30. * @return the card removed from the deck
  31. *
  32. * @throws IllegalStateException is thrown if the deck is empty (contains no cards)
  33. *
  34. * @see model.card.Card
  35. */
  36. public Card removeNextCard() throws IllegalStateException;
  37.  
  38.  
  39. /**
  40. * @return the number of cards remaining in the deck
  41. */
  42. public int cardsInDeck();
  43.  
  44.  
  45. /**
  46. * Shuffles (randomises the order) of the cards in the deck
  47. */
  48. public void shuffleDeck();
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement