use crate::pos::*; /// Carries information on the player's inputs. /// Allows the game to retrieve player input commands, /// without tightly binding to a specific GUI or keybinds. /// This way, game logic can focus on "what the inputs do" /// as opposed to "what do the key presses mean". #[derive(Copy, Clone, Default, Debug)] pub struct PlayerInput { /// The direction that the player wants to move in. /// The creator is responsible for resolving to just one direction /// (eg if the player is holding multiple keys at once, /// or a joystick) pub direction: Option, // other player actions are to be added later }