turtlegame/src/activities/house/mod.rs

24 lines
431 B
Rust
Raw Normal View History

mod grid;
mod player;
use grid::Grid;
use player::Player;
#[derive(Debug, Default)]
pub struct HouseState {
grid: Grid,
player: Player
}
pub fn draw(state: &crate::State, _engine: &comfy::EngineContext<'_>) {
//Draw Grid
state.house.grid.draw();
//Draw Player
state.house.player.draw();
}
pub fn update(state: &mut crate::State, _engine: &mut comfy::EngineContext<'_>) {
state.house.player.update(&state.house.grid);
}