| 123456789101112131415161718192021222324252627282930 |
- const moving_directions = Object.freeze({
- front: "front",
- back: "back",
- left: "left",
- right: "right",
- stop: "stop"
- });
- const rotating_directions = Object.freeze({
- clockwise: "clockwise",
- counterclockwise: "counterclockwise",
- top: "top",
- bottom: "bottom",
- stop: "stop"
- });
- const is_moving_direction = (target) => {
- return Object.values(moving_directions).includes(target);
- }
- const is_rotating_direction = (target) => {
- return Object.values(rotating_directions).includes(target);
- }
- export {
- moving_directions,
- is_moving_direction,
- rotating_directions,
- is_rotating_direction
- };
|