[ Facing::SOUTH, Facing::EAST ], self::CURVE_SOUTHWEST => [ Facing::SOUTH, Facing::WEST ], self::CURVE_NORTHWEST => [ Facing::NORTH, Facing::WEST ], self::CURVE_NORTHEAST => [ Facing::NORTH, Facing::EAST ] ]; protected function getMetaForState(array $connections) : int{ try{ return self::searchState($connections, self::CURVE_CONNECTIONS); }catch(\InvalidArgumentException $e){ return parent::getMetaForState($connections); } } protected function getConnectionsFromMeta(int $meta) : ?array{ return self::CURVE_CONNECTIONS[$meta] ?? self::CONNECTIONS[$meta] ?? null; } protected function getPossibleConnectionDirectionsOneConstraint(int $constraint) : array{ static $horizontal = [ Facing::NORTH, Facing::SOUTH, Facing::WEST, Facing::EAST ]; $possible = parent::getPossibleConnectionDirectionsOneConstraint($constraint); if(($constraint & self::FLAG_ASCEND) === 0){ foreach($horizontal as $d){ if($constraint !== $d){ $possible[$d] = true; } } } return $possible; } }