|
<?php
|
|
|
|
namespace Automata\Modes\G;
|
|
|
|
abstract class G
|
|
{
|
|
public int $G;
|
|
|
|
public function __construct(int $G)
|
|
{
|
|
$this->G = $G;
|
|
}
|
|
|
|
|
|
public final function apply(int $G): void
|
|
{
|
|
if ($this->supports($G)) {
|
|
$this->G = $G;
|
|
}
|
|
}
|
|
|
|
|
|
public abstract function supports(int $G): bool;
|
|
}
|