argTest를 로직 순서에 맞게 변경

This commit is contained in:
Hide_D committed 2018-10-21 14:28:29 +09:00
1 parent c71a92302a
commit 3cc437a17f
27 files changed
+289 -304

No files matched your search

+13 -13
View File
@@ -23,6 +23,19 @@ use sammo\CityConst;
class che_이동 extends Command\GeneralCommand{
static protected $actionName = '이동';
protected function argTest():bool{
if(!key_exists('destCityID', $this->arg)){
return false;
}
if(!key_exists($this->arg['destCityID'], CityConst::all())){
return false;
}
$this->arg = [
'destCityID'=>$this->arg['destCityID']
];
return true;
}
protected function init(){
$general = $this->generalObj;
@@ -41,19 +54,6 @@ class che_이동 extends Command\GeneralCommand{
];
}
protected function argTest():bool{
if(!key_exists('destCityID', $this->arg)){
return false;
}
if(!key_exists($this->arg['destCityID'], CityConst::all())){
return false;
}
$this->arg = [
'destCityID'=>$this->arg['destCityID']
];
return true;
}
public function getCost():array{
$env = $this->env;
return [$env['develcost'], 0];