extract GameState
This commit is contained in:
parent
78c199b61e
commit
6cd10329df
14 changed files with 118 additions and 28 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue