jong/spacetimedb/src/tables.rs

30 lines
522 B
Rust
Raw Normal View History

2026-02-11 10:14:02 -08:00
use spacetimedb::{Filter, SpacetimeType, client_visibility_filter, table};
use jong_types::*;
2026-02-11 10:14:02 -08:00
pub mod player;
pub use player::*;
#[derive(Debug, Clone)]
#[table(name = lobby, public)]
pub struct Lobby {
#[primary_key]
#[auto_inc]
pub id: u32,
#[unique]
pub host_player_id: u32,
2026-02-11 10:14:02 -08:00
pub players: Vec<player::PlayerOrBot>,
pub game_state: GameState,
2026-02-10 01:40:13 -08:00
pub turn_state: TurnState,
}
#[table(name = wall)]
pub struct Wall {
#[primary_key]
pub lobby_id: u32,
pub tiles: Vec<Tile>,
}