wip: 개인 전략 폼

This commit is contained in:
2023-12-25 09:49:08 +00:00
parent 85dc5347c5
commit eb36e7ccf4
8 changed files with 655 additions and 5 deletions
+21
View File
@@ -416,6 +416,27 @@ function buildGeneralCommandClass(?string $type, General $generalObj, array $env
return new $class($generalObj, $env, $arg);
}
function getUserActionCommandClass(?string $type){
if($type === null || $type === ''){
$type = '휴식';
}
static $basePath = __NAMESPACE__.'\\Command\\UserAction\\';
$classPath = ($basePath.$type);
if(class_exists($classPath)){
return $classPath;
}
throw new \InvalidArgumentException("{$type}은 올바른 개변 전략 커맨드가 아님");
}
function buildUserActionCommandClass(?string $type, General $generalObj, array $env, $arg = null):Command\UserActionCommand{
$class = getUserActionCommandClass($type);
return new $class($generalObj, $env, $arg);
}
function getNationCommandClass(?string $type){
if($type === null || $type === ''){
$type = '휴식';