We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Total Complexity | 11 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 8 | class Hand { |
||
| 9 | |||
| 10 | private array $cards = []; |
||
| 11 | private int $value = 0; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Add a hand to this card by drawing it from $deck. |
||
| 15 | */ |
||
| 16 | public function drawCard(Deck $deck) : void { |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Return the hand's total blackjack value. |
||
| 23 | */ |
||
| 24 | public function getValue() : int { |
||
| 25 | return $this->value; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Return the number of cards in this hand. |
||
| 30 | */ |
||
| 31 | public function getNumCards() : int { |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getCards() : array { |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Does this hand have Blackjack? |
||
| 41 | */ |
||
| 42 | public function hasBlackjack() : bool { |
||
| 43 | return $this->getNumCards() == 2 && $this->getValue() == 21; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Update the stored value of this hand. |
||
| 48 | */ |
||
| 49 | private function updateValue() : void { |
||
| 64 | } |
||
| 65 | |||
| 67 |