Lines 100.00% 3 / 3
Functions and Methods 100.00% 3 / 3
Classes and Traits 100.00% 1 / 1
Name Lines Functions and Methods CRAP Classes and Traits
MapPlayer 100.00% 3 / 3 100.00% 3 / 3 3 100.00% 1 / 1
 __construct 100.00% 1 / 1 100.00% 1 / 1 1
 move 100.00% 1 / 1 100.00% 1 / 1 1
 change 100.00% 1 / 1 100.00% 1 / 1 1
1<?php
2
3declare(strict_types=1);
4
5namespace Lorekeeper\Core\World\Map;
6
7use Lorekeeper\Core\Game\Combat\CombatState;
8use Lorekeeper\Core\Player\Player;
9
10final class MapPlayer
11{
12    public function __construct(
13        public readonly Player $player,
14        public private(set) MapSpot $spot,
15        public private(set) CombatState $state,
16    ) {}
17
18    public function move(MapSpot $spot): void
19    {
20        $this->spot = $spot;
21    }
22
23    public function change(CombatState $state): void
24    {
25        $this->state = $state;
26    }
27}