X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=doc%2FARCHITECTURE.txt;h=d074067de68e29e10bd95105fae0b8a695e30b3b;hb=42fe80f6f6e6d31736eb2a76420ce4c2015b39c6;hp=b3501511cfae67410df480759e9079ef8a985886;hpb=45d9a6a4a7547e431c1dbe8064b110c54186260d;p=brisk.git diff --git a/doc/ARCHITECTURE.txt b/doc/ARCHITECTURE.txt index b350151..d074067 100644 --- a/doc/ARCHITECTURE.txt +++ b/doc/ARCHITECTURE.txt @@ -1,7 +1,37 @@ Sparse documentation about Brisk. +==== brisk/table/user relationships ==== + +=== in the room === + +// when standup +bri->user[user_idx] = user +user->idx = user_idx +user->idx_orig = user_idx + +// when sitdown +table->player[player_idx] = user_idx +user->table_pos = player_idx + +=== in the game === + +bin5->user[user_idx] = user +table->player[player_idx] = user_idx +user->table_pos = player_idx + + Many things aren't documented at all, but I start with authentication workflow. +==== MODIFY USERS TABLE ==== + +=== PHP CODE === + +web/Obj/dbase_base.phh + function LoginDBItem -> args & body + function LoginDBItemFromRecord -> args & body + +=== SQL CODE === +sql/sql.d/nnn-name-patch.sql AUTHENTICATION WORKFLOW @@ -17,3 +47,28 @@ index.php: --- CLI ------------ POST index.php with passid_private field equal to calcMD5(tokens[1]+calcMD5(form.elements['passid'].value)) + + +===== Game Lifecycle ===== + +-> bin5/index_wr.php + argz[0] == 'logout' + - bri->table_wakeup($user) + - set users subst to "shutdowner" and "shutdowned" + - save this: "gst.st_loc++; the_end=true; window.onbeforeunload = null; \ + window.onunload = null; document.location.assign("../index.php");" + in user->comm var for client xhr + - set $bri->the_end = TRUE + + +-> index.php (after verify session value: ~L250) + - garbage_manager(TRUE) + - align many status var with briskin5 user values + - room_join_wakeup() + +==== Chunk flow ==== + + +$ret = $user->maincheck($old_stat, $old_subst, $old_step, $this->rd_stat, $this->rd_subst, $this->rd_step, + $splashdate, $table_idx, $table_token)) +$user->rd_transp->chunk($this->rd_scristp++, $ret); +