24 lines
423 B
Rust
24 lines
423 B
Rust
|
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);
|
||
|
}
|