@@ -11,6 +11,9 @@ |
||
11 | 11 | $this->movement = $movement; |
12 | 12 | } |
13 | 13 | |
14 | + /** |
|
15 | + * @param string $movement |
|
16 | + */ |
|
14 | 17 | public static function fromString($movement): Movement |
15 | 18 | { |
16 | 19 | return new self($movement); |
@@ -39,8 +39,7 @@ |
||
39 | 39 | if ($movement->isForward()) |
40 | 40 | { |
41 | 41 | $new_position = $this->position->moveForward($this->orientation); |
42 | - } |
|
43 | - else |
|
42 | + } else |
|
44 | 43 | { |
45 | 44 | $new_position = $this->position->moveBackward($this->orientation); |
46 | 45 | } |