WolfEncounterEvent::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 10
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Event\Story\FirstChapter\WoodsTravel\WolfEncounter;
6
7
use AardsGerds\Game\Entity\Beast\Animal\Wolf;
8
use AardsGerds\Game\Event\Decision\DecisionCollection;
9
use AardsGerds\Game\Event\Decision\FightDecision;
10
use AardsGerds\Game\Event\EncounterEvent;
11
use AardsGerds\Game\Event\Story\FirstChapter\WoodsTravel\FightWolf\FightWolfEvent;
12
13
final class WolfEncounterEvent extends EncounterEvent
14
{
15
    public function __construct()
16
    {
17
        $subject = new Wolf();
18
19
        parent::__construct(
20
            new WolfEncounterContext(),
21
            new DecisionCollection([
22
                new FightDecision(new FightWolfEvent($subject))
23
            ]),
24
            $subject,
25
        );
26
    }
27
}
28