more refactor, start using stdb for everything???
4.5th rewrite for tui
This commit is contained in:
parent
034e543d40
commit
c3686221aa
29 changed files with 478 additions and 744 deletions
|
|
@ -4,7 +4,9 @@ use spacetimedb::{ReducerContext, Table, reducer};
|
|||
use crate::tables::{player::player, *};
|
||||
|
||||
mod reducers {
|
||||
mod game;
|
||||
mod deal;
|
||||
mod hand;
|
||||
mod lobby;
|
||||
}
|
||||
mod tables;
|
||||
|
||||
|
|
@ -13,6 +15,18 @@ pub fn clear_all(ctx: &ReducerContext) {
|
|||
for row in ctx.db.player().iter() {
|
||||
ctx.db.player().delete(row);
|
||||
}
|
||||
for row in ctx.db.lobby().iter() {
|
||||
ctx.db.lobby().delete(row);
|
||||
}
|
||||
for row in ctx.db.bot().iter() {
|
||||
ctx.db.bot().delete(row);
|
||||
}
|
||||
for row in ctx.db.wall().iter() {
|
||||
ctx.db.wall().delete(row);
|
||||
}
|
||||
for row in ctx.db.tile().iter() {
|
||||
ctx.db.tile().delete(row);
|
||||
}
|
||||
}
|
||||
|
||||
#[reducer(client_connected)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue