dzura/www/js/const.js
2024-08-19 12:53:39 -07:00

46 lines
782 B
JavaScript

let MAIN = null;
let MENU = null;
let SCENE = null;
let CONNECTED = false;
let SOCKET = null;
let CONTEXT = {
Scene: null,
Auth: null,
Data: null,
};
const Status = {
Ok: 0x0000,
Error: 0x0001,
NotImplemented: 0x0002,
BadHandle: 0x0010,
BadSecret: 0x0011,
BadCode: 0x0012,
};
const OpCode = {
Register :0x0010,
Authenticate :0x0011,
Resume :0x0012,
Deauthenticate :0x0013,
SessionList :0x0020,
SessionCreate :0x0021,
SessionJoin :0x0022,
SessionRetire :0x002E,
SessionLeave :0x002F,
GameState :0x0030,
GamePlay :0x0031,
GameHistory :0x0032,
};
const GameState = {
Joinable :0x00,
Ongoing :0x01,
Complete :0x02,
};