(int number)
| 30 | } |
| 31 | |
| 32 | public T[] dealHand(int number) { |
| 33 | if (remainingCards() < number) { |
| 34 | return null; |
| 35 | } |
| 36 | |
| 37 | T[] hand = (T[]) new Card[number]; |
| 38 | int count = 0; |
| 39 | while (count < number) { |
| 40 | T card = dealCard(); |
| 41 | if (card != null) { |
| 42 | hand[count] = card; |
| 43 | count++; |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | return hand; |
| 48 | } |
| 49 | |
| 50 | public T dealCard() { |
| 51 | if (remainingCards() == 0) { |
nothing calls this directly
no test coverage detected