@@ -11,15 +11,13 @@ |
||
| 11 | 11 | * |
| 12 | 12 | * @property-write string $template |
| 13 | 13 | */ |
| 14 | -final class TextCombatLogRender implements ICombatLogRender |
|
| 15 | -{ |
|
| 14 | +final class TextCombatLogRender implements ICombatLogRender { |
|
| 16 | 15 | use \Nette\SmartObject; |
| 17 | 16 | |
| 18 | 17 | private \Latte\Engine $latte; |
| 19 | 18 | private string $template = __DIR__ . "/CombatLog.latte"; |
| 20 | 19 | |
| 21 | - public function __construct(LatteFactory $latteFactory, private readonly Translator $translator) |
|
| 22 | - { |
|
| 20 | + public function __construct(LatteFactory $latteFactory, private readonly Translator $translator) { |
|
| 23 | 21 | $this->latte = $latteFactory->create(); |
| 24 | 22 | } |
| 25 | 23 | |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * @author Jakub Konečný |
| 10 | 10 | */ |
| 11 | -final class CombatActionSelector implements ICombatActionSelector |
|
| 12 | -{ |
|
| 11 | +final class CombatActionSelector implements ICombatActionSelector { |
|
| 13 | 12 | public function chooseAction(CombatBase $combat, Character $character): ?ICombatAction |
| 14 | 13 | { |
| 15 | 14 | if (!$character->canAct()) { |
@@ -13,8 +13,7 @@ |
||
| 13 | 13 | { |
| 14 | 14 | protected string $class = CharacterEffect::class; |
| 15 | 15 | |
| 16 | - public function __construct(private readonly Character $character) |
|
| 17 | - { |
|
| 16 | + public function __construct(private readonly Character $character) { |
|
| 18 | 17 | parent::__construct(); |
| 19 | 18 | } |
| 20 | 19 | |
@@ -15,15 +15,13 @@ |
||
| 15 | 15 | * @property-read string $skillType |
| 16 | 16 | * @property-read bool $usable |
| 17 | 17 | */ |
| 18 | -abstract class BaseCharacterSkill |
|
| 19 | -{ |
|
| 18 | +abstract class BaseCharacterSkill { |
|
| 20 | 19 | use \Nette\SmartObject; |
| 21 | 20 | |
| 22 | 21 | protected int $level; |
| 23 | 22 | protected int $cooldown = 0; |
| 24 | 23 | |
| 25 | - public function __construct(protected BaseSkill $skill, int $level) |
|
| 26 | - { |
|
| 24 | + public function __construct(protected BaseSkill $skill, int $level) { |
|
| 27 | 25 | $this->setLevel($level); |
| 28 | 26 | $this->resetCooldown(); |
| 29 | 27 | } |
@@ -8,6 +8,5 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * @author Jakub Konečný |
| 10 | 10 | */ |
| 11 | -class ImmutableException extends InvalidStateException |
|
| 12 | -{ |
|
| 11 | +class ImmutableException extends InvalidStateException { |
|
| 13 | 12 | } |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * @author Jakub Konečný |
| 10 | 10 | */ |
| 11 | -interface ICombatActionSelector |
|
| 12 | -{ |
|
| 11 | +interface ICombatActionSelector { |
|
| 13 | 12 | public function chooseAction(CombatBase $combat, Character $character): ?ICombatAction; |
| 14 | 13 | } |