Co-authored-by: luckyturtledev <git@lukas1818.de> Reviewed-on: #5 Co-authored-by: Dominic <git@msrd0.de> Co-committed-by: Dominic <git@msrd0.de>
23 lines
431 B
Rust
23 lines
431 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);
|
|
}
|