detect hand change and render it
This commit is contained in:
parent
d506a25716
commit
3417384b86
9 changed files with 138 additions and 68 deletions
|
|
@ -3,30 +3,32 @@ use tracing::instrument;
|
|||
|
||||
use crate::tiles::{self, *};
|
||||
|
||||
mod player;
|
||||
pub mod player;
|
||||
pub mod wall;
|
||||
|
||||
pub struct Riichi;
|
||||
#[derive(States, Default, Hash, Clone, Eq, Debug, PartialEq)]
|
||||
pub enum GameState {
|
||||
#[default]
|
||||
None,
|
||||
Setup,
|
||||
// Deal,
|
||||
Play,
|
||||
Score,
|
||||
}
|
||||
|
||||
pub struct Riichi;
|
||||
impl Plugin for Riichi {
|
||||
fn build(&self, app: &mut App) {
|
||||
app.init_resource::<Compass>()
|
||||
.add_systems(Startup, init_match)
|
||||
.add_systems(Startup, (tiles::init_tiles, wall::build_wall).chain())
|
||||
.add_systems(Startup, tiles::init_tiles)
|
||||
.init_state::<GameState>()
|
||||
.add_systems(OnEnter(GameState::Setup), (wall::build_wall, player::deal_hands).chain())
|
||||
// semicolon stopper
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(States, Default, Hash, Clone, Eq, Debug, PartialEq)]
|
||||
enum GameState {
|
||||
#[default]
|
||||
Setup,
|
||||
Deal,
|
||||
Play,
|
||||
Score,
|
||||
}
|
||||
|
||||
#[derive(Component)]
|
||||
pub(crate) struct Dice(u8, u8);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue