| Total Complexity | 7 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php declare(strict_types=1); |
||
| 8 | final class Players extends ImmutableCollection |
||
| 9 | { |
||
| 10 | public function __construct(Player ...$players) |
||
| 11 | { |
||
| 12 | parent::__construct(...$players); |
||
| 13 | } |
||
| 14 | |||
| 15 | public function current(): Player |
||
| 18 | } |
||
| 19 | |||
| 20 | public function pickRandom(): int |
||
| 21 | { |
||
| 22 | return (int) array_rand($this->items()); |
||
| 23 | } |
||
| 24 | |||
| 25 | public function drawOpeningHands(MatchId $match): void |
||
| 26 | { |
||
| 27 | foreach ($this as $player) { |
||
| 28 | $player->drawOpeningHand($match); |
||
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 32 | public function after(int $player): int |
||
| 35 | } |
||
| 36 | } |
||
| 37 |