buildGeneralCommandClass류 구현
This commit is contained in:
@@ -5,8 +5,7 @@ function getGeneralTurnBrief(General $generalObj, array $turnList) {
|
||||
$result = [];
|
||||
|
||||
foreach($turnList as $turnIdx => [$action, $arg]){
|
||||
$commandClass = getGeneralCommandClass($action);
|
||||
$commandObj = new $commandClass($generalObj, [], $arg);
|
||||
$commandObj = buildGeneralCommandClass($action, $generalObj, [], $arg);
|
||||
$turnText = $commandObj->getBrief();
|
||||
$result[$turnIdx] = $turnText;
|
||||
}
|
||||
@@ -18,8 +17,7 @@ function getNationTurnBrief(General $generalObj, array $turnList) {
|
||||
|
||||
$tmpTurn = new LastTurn();
|
||||
foreach($turnList as $turnIdx => [$action, $arg]){
|
||||
$commandClass = getNationCommandClass($action);
|
||||
$commandObj = new $commandClass($generalObj, [], $tmpTurn, $arg);
|
||||
$commandObj = buildNationCommandClass($action, $generalObj, [], $tmpTurn, $arg);
|
||||
$turnText = $commandObj->getBrief();
|
||||
$result[$turnIdx] = $turnText;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user