Properly implement tests.
All checks were successful
The build was successful.

This commit is contained in:
2019-07-01 20:07:06 +02:00
parent 376b9510a9
commit c94de60c29
4 changed files with 11 additions and 9 deletions

View File

@@ -22,7 +22,7 @@ class Brainfuck {
}
private void interpret(string $command) {
if(!$this->cells[$this->pointer]) {
if(!array_key_exists($this->pointer, $this->cells)) {
$this->cells[$this->pointer] = 0;
}
switch ($command) {