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,23 @@
<?php
namespace Automata\Storage;
use Automata\Tool;
class ToolMemory
{
/** @var Tool[] */
private array $memory = [];
public function save(Tool $tool): void
{
$this->memory[$tool->T] = $tool;
}
public function read(int $T): ?Tool
{
return @$this->memory[$T];
}
}