01219343/unit/poker
รุ่นแก้ไขเมื่อ 16:03, 24 มกราคม 2556 โดย Jittat (คุย | มีส่วนร่วม)
Follow the TDD steps to write these classes.
Card
A card has a rank (A,1,...,9,10,J,Q,K) and a suit (S,H,D,C) (see suit).
Implement class Card
that supports the following methods:
- Construction with rank and suit as strings. For example:
Card card = new Card('10','S');
- Getters:
getRank
andgetSuit
hasSameRank
hasSameSuit
- implements
Comparable<Card>
Hand
Use reference of poker hands from wikipedia.