From 1d0bcd857e94813dc11b1812d54299fe6922ed00 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 3 Oct 2018 17:27:04 +0900 Subject: [PATCH] =?UTF-8?q?LastTurn=20=EA=B4=80=EB=A6=AC=EC=9A=A9=20?= =?UTF-8?q?=EA=B0=9D=EC=B2=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/LastTurn.php | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 hwe/sammo/LastTurn.php diff --git a/hwe/sammo/LastTurn.php b/hwe/sammo/LastTurn.php new file mode 100644 index 00000000..5db76647 --- /dev/null +++ b/hwe/sammo/LastTurn.php @@ -0,0 +1,53 @@ +command = $command; + } + + function getCommand():string{ + return $this->command; + } + + function setArg(?array $arg){ + $this->arg = $arg; + } + + function getArg():?array{ + return $this->arg; + } + + function setTerm(?int $term){ + $this->term = $term; + } + + function getTerm():?int{ + return $this->term; + } + + function toJson():string{ + $result = [ + 'command'=>$this->command + ]; + if($this->arg !== null){ + $result['arg'] = $this->arg; + } + if($this->term !== null){ + $result['term'] = $this->term; + } + return Json::encode($result); + } +} \ No newline at end of file