(stash)
This commit is contained in:
parent
d7b4221727
commit
2d3993452b
33 changed files with 920 additions and 143 deletions
|
|
@ -15,6 +15,8 @@ pub fn join_or_create_lobby(ctx: &ReducerContext, mut lobby_id: u32) -> Result<(
|
|||
.ok_or(format!("cannot find player {}", ctx.sender))?;
|
||||
|
||||
if lobby_id == 0 {
|
||||
// TODO check first if player is already in a lobby
|
||||
|
||||
let lobby = ctx.db.lobby().insert(Lobby {
|
||||
id: 0,
|
||||
players: vec![PlayerOrBot::Player { id: player.id }],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue