dzura/www/js/const.js
2024-08-25 23:54:07 -07:00

54 lines
970 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,
Approve :0x0003,
Reject :0x0004,
BadHandle :0x0010,
BadSecret :0x0011,
BadCode :0x0012,
};
const OpCode = {
Register :0x0010,
Authenticate :0x0011,
Resume :0x0012,
Deauthenticate :0x0013,
SessionList :0x0020,
//SessionJoin :0x0021,
SessionView :0x0022,
SessionResign :0x002E,
SessionLeave :0x002F,
GameState :0x0030,
GamePlay :0x0031,
GameHistory :0x0032,
Challenge :0x0060,
ChallengeAnswer :0x0061,
ChallengeList :0x0062,
UserList :0x0100,
};
const GameState = {
Joinable :0x00,
Ongoing :0x01,
Complete :0x02,
};