Skip to content

Commit

Permalink
Added Facing::OFFSETS constant
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Aug 3, 2023
1 parent 2c6e6af commit 3cdc59a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Facing.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ private function __construct(){
self::EAST
];

public const OFFSETS = [
self::DOWN => [ 0, -1, 0],
self::UP => [ 0, +1, 0],
self::NORTH => [ 0, 0, -1],
self::SOUTH => [ 0, 0, +1],
self::WEST => [-1, 0, 0],
self::EAST => [+1, 0, 0]
];

private const CLOCKWISE = [
Axis::Y => [
self::NORTH => self::EAST,
Expand Down

0 comments on commit 3cdc59a

Please sign in to comment.