AbstractGame::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace GameDomain\Game;
4
5
use GameDomain\Round\RoundCollection;
6
use GameDomain\Rule\AbstractRulesSet;
7
8
/**
9
 * Game
10
 */
11
abstract class AbstractGame
12
{
13
    /** @var \GameDomain\Rule\AbstractRulesSet */
14
    protected $gameRules;
15
16
    /**
17
     * {@inheritDoc}
18
     */
19
    final public function __construct(AbstractRulesSet $gameRules)
20
    {
21
        $this->gameRules = $gameRules;
22
    }
23
24
    /**
25
     * @param \GameDomain\Round\RoundCollection $rounds
26
     *
27
     * @return \GameDomain\Round\RoundResultCollection
28
     */
29
    abstract public function play(RoundCollection $rounds);
30
}
31