천도 추가

This commit is contained in:
2020-04-14 01:49:40 +09:00
parent 33014dbd7d
commit 85389c4a60
11 changed files with 548 additions and 9 deletions
+12 -2
View File
@@ -5,12 +5,14 @@ class LastTurn{
protected $command = '휴식';
protected $arg = null;
protected $term = null;
protected $seq = null;
function __construct(?string $command=null, ?array $arg=null, ?int $term=null)
function __construct(?string $command=null, ?array $arg=null, ?int $term=null, ?int $seq=null)
{
$this->setCommand($command);
$this->setArg($arg);
$this->setTerm($term);
$this->setSeq($term);
}
static function fromJson(?string $json):self{
@@ -43,7 +45,7 @@ class LastTurn{
function getArg():?array{
return $this->arg;
}
}
function setTerm(?int $term){
$this->term = $term;
@@ -53,6 +55,14 @@ class LastTurn{
return $this->term;
}
function setSeq(?int $seq){
$this->seq = $seq;
}
function getSeq():?int{
return $this->seq;
}
function toJson():string{
$result = [
'command'=>$this->command