use crate::level::Level; use crate::player::Player; pub struct Game { pub player: Player, pub levels: [Level; 25] } impl Game { pub fn move_player(&mut self, dx: i8, dy: i8) { // check if move is allowed first self.player.change_position(dx, dy); } }