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