extract GameState

This commit is contained in:
Tao Tien 2026-02-08 18:15:09 -08:00
parent 78c199b61e
commit 6cd10329df
14 changed files with 118 additions and 28 deletions

View file

@ -40,6 +40,8 @@ pub struct Lobby {
#[index(direct)]
#[unique]
host_id: u32,
game_state: GameState,
}
#[table(name = wall)]
@ -99,6 +101,7 @@ pub fn join_or_create_lobby(ctx: &ReducerContext, lobby: Option<u32>) -> Result<
let lobby = ctx.db.lobby().insert(Lobby {
id: 0,
host_id: player.id,
game_state: GameState::None,
});
info!("created lobby: {:?}", lobby);