전략별 쿨타임 적용

This commit is contained in:
2020-07-13 23:21:21 +09:00
parent 6306dae92d
commit 27e5d73da1
16 changed files with 2229 additions and 2157 deletions
+5 -5
View File
@@ -271,8 +271,8 @@ abstract class BaseCommand{
return $this->logger;
}
abstract protected function getNextExecuteKey():string;
abstract public function getNextAvailable():?int;
abstract public function getNextExecuteKey():string;
abstract public function getNextAvailableTurn():?int;
abstract public function setNextAvailable(?int $yearMonth=null);
protected function testPostReqTurn():?array{
@@ -280,13 +280,13 @@ abstract class BaseCommand{
return null;
}
$nextAvailable = $this->getNextAvailable();
if($nextAvailable === null){
$nextAvailableTurn = $this->getNextAvailableTurn();
if($nextAvailableTurn === null){
return null;
}
$yearMonth = Util::joinYearMonth($this->env['year'], $this->env['month']);
$remainTurn = $nextAvailable - $yearMonth - $this->getPreReqTurn();
$remainTurn = $nextAvailableTurn - $yearMonth;
if($remainTurn <= 0){
return null;
}