turn_state logic

This commit is contained in:
Tao Tien 2026-02-10 01:40:13 -08:00
parent f6361b9fa1
commit 1e6a3ca84b
10 changed files with 61 additions and 16 deletions

View file

@ -13,7 +13,6 @@ pub fn shuffle_deal(ctx: &ReducerContext, lobby_id: u32) {
lobby.game_state = GameState::Deal;
let mut lobby = ctx.db.lobby().id().update(lobby);
let tiles = new_shuffled_wall(ctx);
ctx.db.wall().insert(Wall {
// id: 0,
@ -24,6 +23,7 @@ pub fn shuffle_deal(ctx: &ReducerContext, lobby_id: u32) {
deal_hands(ctx, lobby_id);
lobby.game_state = GameState::Play;
lobby.turn_state = TurnState::Tsumo;
ctx.db.lobby().id().update(lobby);
}