Initial commit

This commit is contained in:
2020-05-08 00:37:29 +02:00
commit e2b8f1d7aa
29 changed files with 1497 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace Automata\Modes\M;
class CoolantMode extends M
{
public function supports(int $M): bool
{
return in_array($M, [0, 2, 6, 8, 9, 30]);
}
public function apply(int $M): void
{
if (!$this->supports($M)) {
return;
}
if (in_array($M, [0, 2, 6, 30])) {
$this->M = 9;
return;
}
// 8 or 9
$this->M = $M;
}
}