feat(wip): GameUnitConstrint

This commit is contained in:
2025-01-21 15:26:29 +00:00
parent 3e5727a166
commit 77ec4c6572
9 changed files with 175 additions and 131 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace sammo\GameUnitConstraint;
use sammo\General;
use sammo\KVStorage;
class ReqTech extends BaseGameUnitConstraint {
public function __construct(protected int $reqTech)
{
}
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
{
if ($tech < $this->reqTech) {
return false;
}
}
public function getInfo(): string
{
return "기술력 {$this->reqTech} 이상 필요";
}
}