more refactor, start using stdb for everything???

4.5th rewrite for tui
This commit is contained in:
Tao Tien 2026-02-16 00:05:57 -08:00
parent 034e543d40
commit c3686221aa
29 changed files with 478 additions and 744 deletions

View file

@ -1,6 +1,9 @@
use spacetimedb::table;
use spacetimedb::{SpacetimeType, table};
use jong_types::*;
use jong_types::{
tiles::Tile,
states::{GameState, TurnState},
};
pub mod player;
pub use player::*;
@ -14,7 +17,7 @@ pub struct Lobby {
#[unique]
pub host_player_id: u32,
pub players: Vec<player::PlayerOrBot>,
pub players: Vec<PlayerOrBot>,
pub dealer_idx: u8,
pub current_idx: u8,
@ -37,5 +40,11 @@ pub struct DbTile {
#[auto_inc]
pub id: u32,
pub tile: jong_types::Tile,
pub tile: Tile,
}
#[derive(Debug, Clone, SpacetimeType)]
pub enum PlayerOrBot {
Player { id: u32 },
Bot { id: u32 },
}