'지난 턴'을 관리하는 기능 추가
This commit is contained in:
@@ -13,6 +13,19 @@ trait LazyVarUpdater{
|
||||
return $this->raw[$key];
|
||||
}
|
||||
|
||||
function touchVar(string $key):bool{
|
||||
if(key_exists($key, $this->raw)){
|
||||
return false;
|
||||
}
|
||||
$this->raw[$key] = null;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function setVar(string $key, $value){
|
||||
return $this->updateVar($key, $value);
|
||||
}
|
||||
|
||||
function updateVar(string $key, $value){
|
||||
if($this->raw[$key] === $value){
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user