author | unC0Rr |
Fri, 22 Nov 2024 17:30:45 +0100 | |
branch | transitional_engine |
changeset 16042 | 14b83df1832b |
parent 16040 | 6c5b3c576fc6 |
permissions | -rw-r--r-- |
#[derive(Clone)] pub enum Direction { Left, Right } #[derive(Clone)] pub enum Action { Walk(Direction), LongJump, HighJump(usize) } pub struct Actions { actions: Vec<Action> } impl Actions { pub fn new() -> Self { Self { actions: vec![], } } pub fn push(&mut self, action: Action) { self.actions.push(action) } pub fn pop(&mut self) -> Option<Action> { self.actions.pop() } }