rsnaker/controls/
direction.rs

1//! # Direction Enum
2//!
3//! Represents movement directions in the game.
4//!
5//! # Example
6//! ```rust
7//! use rsnaker::controls::direction::Direction;
8//!
9//! let dir = Direction::Up;
10//! match dir {
11//!     Direction::Up => println!("Moving up"),
12//!     Direction::Down => println!("Moving down"),
13//!     Direction::Left => println!("Moving left"),
14//!     Direction::Right => println!("Moving right"),
15//! }
16//! ```
17//!
18
19/// Represents possible movement directions.
20#[derive(Debug, Clone, Copy, PartialEq, Eq)]
21pub enum Direction {
22    Up,
23    Down,
24    Left,
25    Right,
26}