cabel-movement (#3)
All checks were successful
Rust / rustfmt (push) Successful in 25s
Rust / clippy (push) Successful in 1m21s
Rust / build (push) Successful in 3m1s

Cable Movemnt is finished. grid is hard coded

Reviewed-on: #3
Co-authored-by: Glaeder <niklas@vousten.dev>
Co-committed-by: Glaeder <niklas@vousten.dev>
This commit is contained in:
Glaeder 2024-07-06 17:59:56 +00:00 committed by Glaeder
parent 576b21d8b9
commit 5a4451d6a7
9 changed files with 377 additions and 25 deletions

View file

@ -0,0 +1,23 @@
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);
}