buildGeneralCommandClass류 구현

This commit is contained in:
Hide_D committed 2018-10-06 04:08:43 +09:00
1 parent b94081c45b
commit 1660e563ab
4 files changed
+15 -11

No files matched your search

+2 -4
View File
@@ -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;
}
@@ -270,8 +269,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;
}