From da8bb13ddd3887c70039df9e30dca932338ccbfe Mon Sep 17 00:00:00 2001 From: tangmingyou <234767776@qq.com> Date: Fri, 10 Feb 2023 17:43:46 +0800 Subject: [PATCH] create table 3 texas types --- src/api/proto.js | 1399 +++++++++++++++++++++------- src/api/wsapi.js | 3 + src/app.scss | 7 + src/pages/lobby/lobby.jsx | 52 +- src/pages/new_table/new_table.jsx | 62 +- src/pages/new_table/new_table.scss | 43 +- 6 files changed, 1206 insertions(+), 360 deletions(-) diff --git a/src/api/proto.js b/src/api/proto.js index 2388094..6a21602 100644 --- a/src/api/proto.js +++ b/src/api/proto.js @@ -2641,6 +2641,8 @@ export const api = $root.api = (() => { * @interface IReqCreateTable * @property {number|null} [players] ReqCreateTable players * @property {number|null} [robots] ReqCreateTable robots + * @property {number|null} [texasType] ReqCreateTable texasType + * @property {number|null} [bigBlind] ReqCreateTable bigBlind */ /** @@ -2674,6 +2676,22 @@ export const api = $root.api = (() => { */ ReqCreateTable.prototype.robots = 0; + /** + * ReqCreateTable texasType. + * @member {number} texasType + * @memberof api.ReqCreateTable + * @instance + */ + ReqCreateTable.prototype.texasType = 0; + + /** + * ReqCreateTable bigBlind. + * @member {number} bigBlind + * @memberof api.ReqCreateTable + * @instance + */ + ReqCreateTable.prototype.bigBlind = 0; + /** * Creates a new ReqCreateTable instance using the specified properties. * @function create @@ -2702,6 +2720,10 @@ export const api = $root.api = (() => { writer.uint32(/* id 1, wireType 0 =*/8).int32(message.players); if (message.robots != null && Object.hasOwnProperty.call(message, "robots")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.robots); + if (message.texasType != null && Object.hasOwnProperty.call(message, "texasType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.texasType); + if (message.bigBlind != null && Object.hasOwnProperty.call(message, "bigBlind")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.bigBlind); return writer; }; @@ -2744,6 +2766,14 @@ export const api = $root.api = (() => { message.robots = reader.int32(); break; } + case 3: { + message.texasType = reader.int32(); + break; + } + case 4: { + message.bigBlind = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -2785,6 +2815,12 @@ export const api = $root.api = (() => { if (message.robots != null && message.hasOwnProperty("robots")) if (!$util.isInteger(message.robots)) return "robots: integer expected"; + if (message.texasType != null && message.hasOwnProperty("texasType")) + if (!$util.isInteger(message.texasType)) + return "texasType: integer expected"; + if (message.bigBlind != null && message.hasOwnProperty("bigBlind")) + if (!$util.isInteger(message.bigBlind)) + return "bigBlind: integer expected"; return null; }; @@ -2804,6 +2840,10 @@ export const api = $root.api = (() => { message.players = object.players | 0; if (object.robots != null) message.robots = object.robots | 0; + if (object.texasType != null) + message.texasType = object.texasType | 0; + if (object.bigBlind != null) + message.bigBlind = object.bigBlind | 0; return message; }; @@ -2823,11 +2863,17 @@ export const api = $root.api = (() => { if (options.defaults) { object.players = 0; object.robots = 0; + object.texasType = 0; + object.bigBlind = 0; } if (message.players != null && message.hasOwnProperty("players")) object.players = message.players; if (message.robots != null && message.hasOwnProperty("robots")) object.robots = message.robots; + if (message.texasType != null && message.hasOwnProperty("texasType")) + object.texasType = message.texasType; + if (message.bigBlind != null && message.hasOwnProperty("bigBlind")) + object.bigBlind = message.bigBlind; return object; }; @@ -5243,6 +5289,7 @@ export const api = $root.api = (() => { * @property {number|null} [status] TablePlayer status * @property {number|null} [lastStatus] TablePlayer lastStatus * @property {boolean|null} [master] TablePlayer master + * @property {api.IBetRole|null} [betRole] TablePlayer betRole * @property {Array.|null} [handCard] TablePlayer handCard */ @@ -5326,6 +5373,14 @@ export const api = $root.api = (() => { */ TablePlayer.prototype.master = false; + /** + * TablePlayer betRole. + * @member {api.IBetRole|null|undefined} betRole + * @memberof api.TablePlayer + * @instance + */ + TablePlayer.prototype.betRole = null; + /** * TablePlayer handCard. * @member {Array.} handCard @@ -5374,6 +5429,8 @@ export const api = $root.api = (() => { writer.uint32(/* id 7, wireType 0 =*/56).int32(message.lastStatus); if (message.master != null && Object.hasOwnProperty.call(message, "master")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.master); + if (message.betRole != null && Object.hasOwnProperty.call(message, "betRole")) + $root.api.BetRole.encode(message.betRole, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); if (message.handCard != null && message.handCard.length) for (let i = 0; i < message.handCard.length; ++i) $root.api.Card.encode(message.handCard[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); @@ -5443,6 +5500,10 @@ export const api = $root.api = (() => { message.master = reader.bool(); break; } + case 14: { + message.betRole = $root.api.BetRole.decode(reader, reader.uint32()); + break; + } case 15: { if (!(message.handCard && message.handCard.length)) message.handCard = []; @@ -5508,6 +5569,11 @@ export const api = $root.api = (() => { if (message.master != null && message.hasOwnProperty("master")) if (typeof message.master !== "boolean") return "master: boolean expected"; + if (message.betRole != null && message.hasOwnProperty("betRole")) { + let error = $root.api.BetRole.verify(message.betRole); + if (error) + return "betRole." + error; + } if (message.handCard != null && message.hasOwnProperty("handCard")) { if (!Array.isArray(message.handCard)) return "handCard: array expected"; @@ -5555,6 +5621,11 @@ export const api = $root.api = (() => { message.lastStatus = object.lastStatus | 0; if (object.master != null) message.master = Boolean(object.master); + if (object.betRole != null) { + if (typeof object.betRole !== "object") + throw TypeError(".api.TablePlayer.betRole: object expected"); + message.betRole = $root.api.BetRole.fromObject(object.betRole); + } if (object.handCard) { if (!Array.isArray(object.handCard)) throw TypeError(".api.TablePlayer.handCard: array expected"); @@ -5596,6 +5667,7 @@ export const api = $root.api = (() => { object.status = 0; object.lastStatus = 0; object.master = false; + object.betRole = null; } if (message.robot != null && message.hasOwnProperty("robot")) object.robot = message.robot; @@ -5616,6 +5688,8 @@ export const api = $root.api = (() => { object.lastStatus = message.lastStatus; if (message.master != null && message.hasOwnProperty("master")) object.master = message.master; + if (message.betRole != null && message.hasOwnProperty("betRole")) + object.betRole = $root.api.BetRole.toObject(message.betRole, options); if (message.handCard && message.handCard.length) { object.handCard = []; for (let j = 0; j < message.handCard.length; ++j) @@ -5880,23 +5954,25 @@ export const api = $root.api = (() => { return Card; })(); - api.ReqGameStart = (function() { + api.BetRole = (function() { /** - * Properties of a ReqGameStart. + * Properties of a BetRole. * @memberof api - * @interface IReqGameStart + * @interface IBetRole + * @property {number|null} [minChip] BetRole minChip + * @property {number|null} [maxChip] BetRole maxChip */ /** - * Constructs a new ReqGameStart. + * Constructs a new BetRole. * @memberof api - * @classdesc Represents a ReqGameStart. - * @implements IReqGameStart + * @classdesc Represents a BetRole. + * @implements IBetRole * @constructor - * @param {api.IReqGameStart=} [properties] Properties to set + * @param {api.IBetRole=} [properties] Properties to set */ - function ReqGameStart(properties) { + function BetRole(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5904,63 +5980,91 @@ export const api = $root.api = (() => { } /** - * Creates a new ReqGameStart instance using the specified properties. + * BetRole minChip. + * @member {number} minChip + * @memberof api.BetRole + * @instance + */ + BetRole.prototype.minChip = 0; + + /** + * BetRole maxChip. + * @member {number} maxChip + * @memberof api.BetRole + * @instance + */ + BetRole.prototype.maxChip = 0; + + /** + * Creates a new BetRole instance using the specified properties. * @function create - * @memberof api.ReqGameStart + * @memberof api.BetRole * @static - * @param {api.IReqGameStart=} [properties] Properties to set - * @returns {api.ReqGameStart} ReqGameStart instance + * @param {api.IBetRole=} [properties] Properties to set + * @returns {api.BetRole} BetRole instance */ - ReqGameStart.create = function create(properties) { - return new ReqGameStart(properties); + BetRole.create = function create(properties) { + return new BetRole(properties); }; /** - * Encodes the specified ReqGameStart message. Does not implicitly {@link api.ReqGameStart.verify|verify} messages. + * Encodes the specified BetRole message. Does not implicitly {@link api.BetRole.verify|verify} messages. * @function encode - * @memberof api.ReqGameStart + * @memberof api.BetRole * @static - * @param {api.IReqGameStart} message ReqGameStart message or plain object to encode + * @param {api.IBetRole} message BetRole message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReqGameStart.encode = function encode(message, writer) { + BetRole.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.minChip != null && Object.hasOwnProperty.call(message, "minChip")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minChip); + if (message.maxChip != null && Object.hasOwnProperty.call(message, "maxChip")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxChip); return writer; }; /** - * Encodes the specified ReqGameStart message, length delimited. Does not implicitly {@link api.ReqGameStart.verify|verify} messages. + * Encodes the specified BetRole message, length delimited. Does not implicitly {@link api.BetRole.verify|verify} messages. * @function encodeDelimited - * @memberof api.ReqGameStart + * @memberof api.BetRole * @static - * @param {api.IReqGameStart} message ReqGameStart message or plain object to encode + * @param {api.IBetRole} message BetRole message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReqGameStart.encodeDelimited = function encodeDelimited(message, writer) { + BetRole.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReqGameStart message from the specified reader or buffer. + * Decodes a BetRole message from the specified reader or buffer. * @function decode - * @memberof api.ReqGameStart + * @memberof api.BetRole * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {api.ReqGameStart} ReqGameStart + * @returns {api.BetRole} BetRole * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReqGameStart.decode = function decode(reader, length) { + BetRole.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ReqGameStart(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.BetRole(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.minChip = reader.int32(); + break; + } + case 2: { + message.maxChip = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -5970,109 +6074,130 @@ export const api = $root.api = (() => { }; /** - * Decodes a ReqGameStart message from the specified reader or buffer, length delimited. + * Decodes a BetRole message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof api.ReqGameStart + * @memberof api.BetRole * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {api.ReqGameStart} ReqGameStart + * @returns {api.BetRole} BetRole * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReqGameStart.decodeDelimited = function decodeDelimited(reader) { + BetRole.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReqGameStart message. + * Verifies a BetRole message. * @function verify - * @memberof api.ReqGameStart + * @memberof api.BetRole * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReqGameStart.verify = function verify(message) { + BetRole.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.minChip != null && message.hasOwnProperty("minChip")) + if (!$util.isInteger(message.minChip)) + return "minChip: integer expected"; + if (message.maxChip != null && message.hasOwnProperty("maxChip")) + if (!$util.isInteger(message.maxChip)) + return "maxChip: integer expected"; return null; }; /** - * Creates a ReqGameStart message from a plain object. Also converts values to their respective internal types. + * Creates a BetRole message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof api.ReqGameStart + * @memberof api.BetRole * @static * @param {Object.} object Plain object - * @returns {api.ReqGameStart} ReqGameStart + * @returns {api.BetRole} BetRole */ - ReqGameStart.fromObject = function fromObject(object) { - if (object instanceof $root.api.ReqGameStart) + BetRole.fromObject = function fromObject(object) { + if (object instanceof $root.api.BetRole) return object; - return new $root.api.ReqGameStart(); + let message = new $root.api.BetRole(); + if (object.minChip != null) + message.minChip = object.minChip | 0; + if (object.maxChip != null) + message.maxChip = object.maxChip | 0; + return message; }; /** - * Creates a plain object from a ReqGameStart message. Also converts values to other types if specified. + * Creates a plain object from a BetRole message. Also converts values to other types if specified. * @function toObject - * @memberof api.ReqGameStart + * @memberof api.BetRole * @static - * @param {api.ReqGameStart} message ReqGameStart + * @param {api.BetRole} message BetRole * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReqGameStart.toObject = function toObject() { - return {}; + BetRole.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.minChip = 0; + object.maxChip = 0; + } + if (message.minChip != null && message.hasOwnProperty("minChip")) + object.minChip = message.minChip; + if (message.maxChip != null && message.hasOwnProperty("maxChip")) + object.maxChip = message.maxChip; + return object; }; /** - * Converts this ReqGameStart to JSON. + * Converts this BetRole to JSON. * @function toJSON - * @memberof api.ReqGameStart + * @memberof api.BetRole * @instance * @returns {Object.} JSON object */ - ReqGameStart.prototype.toJSON = function toJSON() { + BetRole.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReqGameStart + * Gets the default type url for BetRole * @function getTypeUrl - * @memberof api.ReqGameStart + * @memberof api.BetRole * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReqGameStart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BetRole.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/api.ReqGameStart"; + return typeUrlPrefix + "/api.BetRole"; }; - return ReqGameStart; + return BetRole; })(); - api.ResBigBlindChip = (function() { + api.ReqGameStart = (function() { /** - * Properties of a ResBigBlindChip. + * Properties of a ReqGameStart. * @memberof api - * @interface IResBigBlindChip - * @property {number|null} [chip] ResBigBlindChip chip + * @interface IReqGameStart */ /** - * Constructs a new ResBigBlindChip. + * Constructs a new ReqGameStart. * @memberof api - * @classdesc Represents a ResBigBlindChip. - * @implements IResBigBlindChip + * @classdesc Represents a ReqGameStart. + * @implements IReqGameStart * @constructor - * @param {api.IResBigBlindChip=} [properties] Properties to set + * @param {api.IReqGameStart=} [properties] Properties to set */ - function ResBigBlindChip(properties) { + function ReqGameStart(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6080,77 +6205,63 @@ export const api = $root.api = (() => { } /** - * ResBigBlindChip chip. - * @member {number} chip - * @memberof api.ResBigBlindChip - * @instance - */ - ResBigBlindChip.prototype.chip = 0; - - /** - * Creates a new ResBigBlindChip instance using the specified properties. + * Creates a new ReqGameStart instance using the specified properties. * @function create - * @memberof api.ResBigBlindChip + * @memberof api.ReqGameStart * @static - * @param {api.IResBigBlindChip=} [properties] Properties to set - * @returns {api.ResBigBlindChip} ResBigBlindChip instance + * @param {api.IReqGameStart=} [properties] Properties to set + * @returns {api.ReqGameStart} ReqGameStart instance */ - ResBigBlindChip.create = function create(properties) { - return new ResBigBlindChip(properties); + ReqGameStart.create = function create(properties) { + return new ReqGameStart(properties); }; /** - * Encodes the specified ResBigBlindChip message. Does not implicitly {@link api.ResBigBlindChip.verify|verify} messages. + * Encodes the specified ReqGameStart message. Does not implicitly {@link api.ReqGameStart.verify|verify} messages. * @function encode - * @memberof api.ResBigBlindChip + * @memberof api.ReqGameStart * @static - * @param {api.IResBigBlindChip} message ResBigBlindChip message or plain object to encode + * @param {api.IReqGameStart} message ReqGameStart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResBigBlindChip.encode = function encode(message, writer) { + ReqGameStart.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.chip != null && Object.hasOwnProperty.call(message, "chip")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.chip); return writer; }; /** - * Encodes the specified ResBigBlindChip message, length delimited. Does not implicitly {@link api.ResBigBlindChip.verify|verify} messages. + * Encodes the specified ReqGameStart message, length delimited. Does not implicitly {@link api.ReqGameStart.verify|verify} messages. * @function encodeDelimited - * @memberof api.ResBigBlindChip + * @memberof api.ReqGameStart * @static - * @param {api.IResBigBlindChip} message ResBigBlindChip message or plain object to encode + * @param {api.IReqGameStart} message ReqGameStart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResBigBlindChip.encodeDelimited = function encodeDelimited(message, writer) { + ReqGameStart.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResBigBlindChip message from the specified reader or buffer. + * Decodes a ReqGameStart message from the specified reader or buffer. * @function decode - * @memberof api.ResBigBlindChip + * @memberof api.ReqGameStart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {api.ResBigBlindChip} ResBigBlindChip + * @returns {api.ReqGameStart} ReqGameStart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResBigBlindChip.decode = function decode(reader, length) { + ReqGameStart.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ResBigBlindChip(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ReqGameStart(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.chip = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -6160,122 +6271,108 @@ export const api = $root.api = (() => { }; /** - * Decodes a ResBigBlindChip message from the specified reader or buffer, length delimited. + * Decodes a ReqGameStart message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof api.ResBigBlindChip + * @memberof api.ReqGameStart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {api.ResBigBlindChip} ResBigBlindChip + * @returns {api.ReqGameStart} ReqGameStart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResBigBlindChip.decodeDelimited = function decodeDelimited(reader) { + ReqGameStart.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResBigBlindChip message. + * Verifies a ReqGameStart message. * @function verify - * @memberof api.ResBigBlindChip + * @memberof api.ReqGameStart * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResBigBlindChip.verify = function verify(message) { + ReqGameStart.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.chip != null && message.hasOwnProperty("chip")) - if (!$util.isInteger(message.chip)) - return "chip: integer expected"; return null; }; /** - * Creates a ResBigBlindChip message from a plain object. Also converts values to their respective internal types. + * Creates a ReqGameStart message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof api.ResBigBlindChip + * @memberof api.ReqGameStart * @static * @param {Object.} object Plain object - * @returns {api.ResBigBlindChip} ResBigBlindChip + * @returns {api.ReqGameStart} ReqGameStart */ - ResBigBlindChip.fromObject = function fromObject(object) { - if (object instanceof $root.api.ResBigBlindChip) + ReqGameStart.fromObject = function fromObject(object) { + if (object instanceof $root.api.ReqGameStart) return object; - let message = new $root.api.ResBigBlindChip(); - if (object.chip != null) - message.chip = object.chip | 0; - return message; + return new $root.api.ReqGameStart(); }; /** - * Creates a plain object from a ResBigBlindChip message. Also converts values to other types if specified. + * Creates a plain object from a ReqGameStart message. Also converts values to other types if specified. * @function toObject - * @memberof api.ResBigBlindChip + * @memberof api.ReqGameStart * @static - * @param {api.ResBigBlindChip} message ResBigBlindChip + * @param {api.ReqGameStart} message ReqGameStart * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResBigBlindChip.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.chip = 0; - if (message.chip != null && message.hasOwnProperty("chip")) - object.chip = message.chip; - return object; + ReqGameStart.toObject = function toObject() { + return {}; }; /** - * Converts this ResBigBlindChip to JSON. + * Converts this ReqGameStart to JSON. * @function toJSON - * @memberof api.ResBigBlindChip + * @memberof api.ReqGameStart * @instance * @returns {Object.} JSON object */ - ResBigBlindChip.prototype.toJSON = function toJSON() { + ReqGameStart.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResBigBlindChip + * Gets the default type url for ReqGameStart * @function getTypeUrl - * @memberof api.ResBigBlindChip + * @memberof api.ReqGameStart * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResBigBlindChip.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReqGameStart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/api.ResBigBlindChip"; + return typeUrlPrefix + "/api.ReqGameStart"; }; - return ResBigBlindChip; + return ReqGameStart; })(); - api.ResSmallBlindChip = (function() { + api.ReqDismissGameTable = (function() { /** - * Properties of a ResSmallBlindChip. + * Properties of a ReqDismissGameTable. * @memberof api - * @interface IResSmallBlindChip - * @property {number|null} [chip] ResSmallBlindChip chip + * @interface IReqDismissGameTable */ /** - * Constructs a new ResSmallBlindChip. + * Constructs a new ReqDismissGameTable. * @memberof api - * @classdesc Represents a ResSmallBlindChip. - * @implements IResSmallBlindChip + * @classdesc Represents a ReqDismissGameTable. + * @implements IReqDismissGameTable * @constructor - * @param {api.IResSmallBlindChip=} [properties] Properties to set + * @param {api.IReqDismissGameTable=} [properties] Properties to set */ - function ResSmallBlindChip(properties) { + function ReqDismissGameTable(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6283,77 +6380,63 @@ export const api = $root.api = (() => { } /** - * ResSmallBlindChip chip. - * @member {number} chip - * @memberof api.ResSmallBlindChip - * @instance - */ - ResSmallBlindChip.prototype.chip = 0; - - /** - * Creates a new ResSmallBlindChip instance using the specified properties. + * Creates a new ReqDismissGameTable instance using the specified properties. * @function create - * @memberof api.ResSmallBlindChip + * @memberof api.ReqDismissGameTable * @static - * @param {api.IResSmallBlindChip=} [properties] Properties to set - * @returns {api.ResSmallBlindChip} ResSmallBlindChip instance + * @param {api.IReqDismissGameTable=} [properties] Properties to set + * @returns {api.ReqDismissGameTable} ReqDismissGameTable instance */ - ResSmallBlindChip.create = function create(properties) { - return new ResSmallBlindChip(properties); + ReqDismissGameTable.create = function create(properties) { + return new ReqDismissGameTable(properties); }; /** - * Encodes the specified ResSmallBlindChip message. Does not implicitly {@link api.ResSmallBlindChip.verify|verify} messages. + * Encodes the specified ReqDismissGameTable message. Does not implicitly {@link api.ReqDismissGameTable.verify|verify} messages. * @function encode - * @memberof api.ResSmallBlindChip + * @memberof api.ReqDismissGameTable * @static - * @param {api.IResSmallBlindChip} message ResSmallBlindChip message or plain object to encode + * @param {api.IReqDismissGameTable} message ReqDismissGameTable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResSmallBlindChip.encode = function encode(message, writer) { + ReqDismissGameTable.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.chip != null && Object.hasOwnProperty.call(message, "chip")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.chip); return writer; }; /** - * Encodes the specified ResSmallBlindChip message, length delimited. Does not implicitly {@link api.ResSmallBlindChip.verify|verify} messages. + * Encodes the specified ReqDismissGameTable message, length delimited. Does not implicitly {@link api.ReqDismissGameTable.verify|verify} messages. * @function encodeDelimited - * @memberof api.ResSmallBlindChip + * @memberof api.ReqDismissGameTable * @static - * @param {api.IResSmallBlindChip} message ResSmallBlindChip message or plain object to encode + * @param {api.IReqDismissGameTable} message ReqDismissGameTable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResSmallBlindChip.encodeDelimited = function encodeDelimited(message, writer) { + ReqDismissGameTable.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResSmallBlindChip message from the specified reader or buffer. + * Decodes a ReqDismissGameTable message from the specified reader or buffer. * @function decode - * @memberof api.ResSmallBlindChip + * @memberof api.ReqDismissGameTable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {api.ResSmallBlindChip} ResSmallBlindChip + * @returns {api.ReqDismissGameTable} ReqDismissGameTable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResSmallBlindChip.decode = function decode(reader, length) { + ReqDismissGameTable.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ResSmallBlindChip(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ReqDismissGameTable(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.chip = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -6363,121 +6446,685 @@ export const api = $root.api = (() => { }; /** - * Decodes a ResSmallBlindChip message from the specified reader or buffer, length delimited. + * Decodes a ReqDismissGameTable message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof api.ResSmallBlindChip + * @memberof api.ReqDismissGameTable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {api.ResSmallBlindChip} ResSmallBlindChip + * @returns {api.ReqDismissGameTable} ReqDismissGameTable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResSmallBlindChip.decodeDelimited = function decodeDelimited(reader) { + ReqDismissGameTable.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResSmallBlindChip message. + * Verifies a ReqDismissGameTable message. * @function verify - * @memberof api.ResSmallBlindChip + * @memberof api.ReqDismissGameTable * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResSmallBlindChip.verify = function verify(message) { + ReqDismissGameTable.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.chip != null && message.hasOwnProperty("chip")) - if (!$util.isInteger(message.chip)) - return "chip: integer expected"; return null; }; /** - * Creates a ResSmallBlindChip message from a plain object. Also converts values to their respective internal types. + * Creates a ReqDismissGameTable message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof api.ResSmallBlindChip + * @memberof api.ReqDismissGameTable * @static * @param {Object.} object Plain object - * @returns {api.ResSmallBlindChip} ResSmallBlindChip + * @returns {api.ReqDismissGameTable} ReqDismissGameTable */ - ResSmallBlindChip.fromObject = function fromObject(object) { - if (object instanceof $root.api.ResSmallBlindChip) + ReqDismissGameTable.fromObject = function fromObject(object) { + if (object instanceof $root.api.ReqDismissGameTable) return object; - let message = new $root.api.ResSmallBlindChip(); - if (object.chip != null) - message.chip = object.chip | 0; - return message; + return new $root.api.ReqDismissGameTable(); }; /** - * Creates a plain object from a ResSmallBlindChip message. Also converts values to other types if specified. + * Creates a plain object from a ReqDismissGameTable message. Also converts values to other types if specified. * @function toObject - * @memberof api.ResSmallBlindChip + * @memberof api.ReqDismissGameTable * @static - * @param {api.ResSmallBlindChip} message ResSmallBlindChip + * @param {api.ReqDismissGameTable} message ReqDismissGameTable * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResSmallBlindChip.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.chip = 0; - if (message.chip != null && message.hasOwnProperty("chip")) - object.chip = message.chip; - return object; + ReqDismissGameTable.toObject = function toObject() { + return {}; }; /** - * Converts this ResSmallBlindChip to JSON. + * Converts this ReqDismissGameTable to JSON. * @function toJSON - * @memberof api.ResSmallBlindChip + * @memberof api.ReqDismissGameTable * @instance * @returns {Object.} JSON object */ - ResSmallBlindChip.prototype.toJSON = function toJSON() { + ReqDismissGameTable.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResSmallBlindChip + * Gets the default type url for ReqDismissGameTable * @function getTypeUrl - * @memberof api.ResSmallBlindChip + * @memberof api.ReqDismissGameTable * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResSmallBlindChip.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReqDismissGameTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/api.ResSmallBlindChip"; + return typeUrlPrefix + "/api.ReqDismissGameTable"; }; - return ResSmallBlindChip; + return ReqDismissGameTable; })(); - api.ReqDismissGameTable = (function() { + api.ResDismissGameTable = (function() { /** - * Properties of a ReqDismissGameTable. + * Properties of a ResDismissGameTable. + * @memberof api + * @interface IResDismissGameTable + */ + + /** + * Constructs a new ResDismissGameTable. + * @memberof api + * @classdesc Represents a ResDismissGameTable. + * @implements IResDismissGameTable + * @constructor + * @param {api.IResDismissGameTable=} [properties] Properties to set + */ + function ResDismissGameTable(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ResDismissGameTable instance using the specified properties. + * @function create + * @memberof api.ResDismissGameTable + * @static + * @param {api.IResDismissGameTable=} [properties] Properties to set + * @returns {api.ResDismissGameTable} ResDismissGameTable instance + */ + ResDismissGameTable.create = function create(properties) { + return new ResDismissGameTable(properties); + }; + + /** + * Encodes the specified ResDismissGameTable message. Does not implicitly {@link api.ResDismissGameTable.verify|verify} messages. + * @function encode + * @memberof api.ResDismissGameTable + * @static + * @param {api.IResDismissGameTable} message ResDismissGameTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResDismissGameTable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ResDismissGameTable message, length delimited. Does not implicitly {@link api.ResDismissGameTable.verify|verify} messages. + * @function encodeDelimited + * @memberof api.ResDismissGameTable + * @static + * @param {api.IResDismissGameTable} message ResDismissGameTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResDismissGameTable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResDismissGameTable message from the specified reader or buffer. + * @function decode + * @memberof api.ResDismissGameTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {api.ResDismissGameTable} ResDismissGameTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResDismissGameTable.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ResDismissGameTable(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResDismissGameTable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof api.ResDismissGameTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {api.ResDismissGameTable} ResDismissGameTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResDismissGameTable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResDismissGameTable message. + * @function verify + * @memberof api.ResDismissGameTable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResDismissGameTable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ResDismissGameTable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof api.ResDismissGameTable + * @static + * @param {Object.} object Plain object + * @returns {api.ResDismissGameTable} ResDismissGameTable + */ + ResDismissGameTable.fromObject = function fromObject(object) { + if (object instanceof $root.api.ResDismissGameTable) + return object; + return new $root.api.ResDismissGameTable(); + }; + + /** + * Creates a plain object from a ResDismissGameTable message. Also converts values to other types if specified. + * @function toObject + * @memberof api.ResDismissGameTable + * @static + * @param {api.ResDismissGameTable} message ResDismissGameTable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResDismissGameTable.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ResDismissGameTable to JSON. + * @function toJSON + * @memberof api.ResDismissGameTable + * @instance + * @returns {Object.} JSON object + */ + ResDismissGameTable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResDismissGameTable + * @function getTypeUrl + * @memberof api.ResDismissGameTable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResDismissGameTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/api.ResDismissGameTable"; + }; + + return ResDismissGameTable; + })(); + + api.ReqPlaceBetChip = (function() { + + /** + * Properties of a ReqPlaceBetChip. + * @memberof api + * @interface IReqPlaceBetChip + * @property {number|null} [betChip] ReqPlaceBetChip betChip + * @property {boolean|null} [allIn] ReqPlaceBetChip allIn + */ + + /** + * Constructs a new ReqPlaceBetChip. + * @memberof api + * @classdesc Represents a ReqPlaceBetChip. + * @implements IReqPlaceBetChip + * @constructor + * @param {api.IReqPlaceBetChip=} [properties] Properties to set + */ + function ReqPlaceBetChip(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReqPlaceBetChip betChip. + * @member {number} betChip + * @memberof api.ReqPlaceBetChip + * @instance + */ + ReqPlaceBetChip.prototype.betChip = 0; + + /** + * ReqPlaceBetChip allIn. + * @member {boolean} allIn + * @memberof api.ReqPlaceBetChip + * @instance + */ + ReqPlaceBetChip.prototype.allIn = false; + + /** + * Creates a new ReqPlaceBetChip instance using the specified properties. + * @function create + * @memberof api.ReqPlaceBetChip + * @static + * @param {api.IReqPlaceBetChip=} [properties] Properties to set + * @returns {api.ReqPlaceBetChip} ReqPlaceBetChip instance + */ + ReqPlaceBetChip.create = function create(properties) { + return new ReqPlaceBetChip(properties); + }; + + /** + * Encodes the specified ReqPlaceBetChip message. Does not implicitly {@link api.ReqPlaceBetChip.verify|verify} messages. + * @function encode + * @memberof api.ReqPlaceBetChip + * @static + * @param {api.IReqPlaceBetChip} message ReqPlaceBetChip message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReqPlaceBetChip.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.betChip != null && Object.hasOwnProperty.call(message, "betChip")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.betChip); + if (message.allIn != null && Object.hasOwnProperty.call(message, "allIn")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allIn); + return writer; + }; + + /** + * Encodes the specified ReqPlaceBetChip message, length delimited. Does not implicitly {@link api.ReqPlaceBetChip.verify|verify} messages. + * @function encodeDelimited + * @memberof api.ReqPlaceBetChip + * @static + * @param {api.IReqPlaceBetChip} message ReqPlaceBetChip message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReqPlaceBetChip.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReqPlaceBetChip message from the specified reader or buffer. + * @function decode + * @memberof api.ReqPlaceBetChip + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {api.ReqPlaceBetChip} ReqPlaceBetChip + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReqPlaceBetChip.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ReqPlaceBetChip(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.betChip = reader.int32(); + break; + } + case 2: { + message.allIn = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReqPlaceBetChip message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof api.ReqPlaceBetChip + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {api.ReqPlaceBetChip} ReqPlaceBetChip + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReqPlaceBetChip.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReqPlaceBetChip message. + * @function verify + * @memberof api.ReqPlaceBetChip + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReqPlaceBetChip.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.betChip != null && message.hasOwnProperty("betChip")) + if (!$util.isInteger(message.betChip)) + return "betChip: integer expected"; + if (message.allIn != null && message.hasOwnProperty("allIn")) + if (typeof message.allIn !== "boolean") + return "allIn: boolean expected"; + return null; + }; + + /** + * Creates a ReqPlaceBetChip message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof api.ReqPlaceBetChip + * @static + * @param {Object.} object Plain object + * @returns {api.ReqPlaceBetChip} ReqPlaceBetChip + */ + ReqPlaceBetChip.fromObject = function fromObject(object) { + if (object instanceof $root.api.ReqPlaceBetChip) + return object; + let message = new $root.api.ReqPlaceBetChip(); + if (object.betChip != null) + message.betChip = object.betChip | 0; + if (object.allIn != null) + message.allIn = Boolean(object.allIn); + return message; + }; + + /** + * Creates a plain object from a ReqPlaceBetChip message. Also converts values to other types if specified. + * @function toObject + * @memberof api.ReqPlaceBetChip + * @static + * @param {api.ReqPlaceBetChip} message ReqPlaceBetChip + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReqPlaceBetChip.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.betChip = 0; + object.allIn = false; + } + if (message.betChip != null && message.hasOwnProperty("betChip")) + object.betChip = message.betChip; + if (message.allIn != null && message.hasOwnProperty("allIn")) + object.allIn = message.allIn; + return object; + }; + + /** + * Converts this ReqPlaceBetChip to JSON. + * @function toJSON + * @memberof api.ReqPlaceBetChip + * @instance + * @returns {Object.} JSON object + */ + ReqPlaceBetChip.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReqPlaceBetChip + * @function getTypeUrl + * @memberof api.ReqPlaceBetChip + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReqPlaceBetChip.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/api.ReqPlaceBetChip"; + }; + + return ReqPlaceBetChip; + })(); + + api.ReqBetWeakHand = (function() { + + /** + * Properties of a ReqBetWeakHand. + * @memberof api + * @interface IReqBetWeakHand + */ + + /** + * Constructs a new ReqBetWeakHand. + * @memberof api + * @classdesc Represents a ReqBetWeakHand. + * @implements IReqBetWeakHand + * @constructor + * @param {api.IReqBetWeakHand=} [properties] Properties to set + */ + function ReqBetWeakHand(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ReqBetWeakHand instance using the specified properties. + * @function create + * @memberof api.ReqBetWeakHand + * @static + * @param {api.IReqBetWeakHand=} [properties] Properties to set + * @returns {api.ReqBetWeakHand} ReqBetWeakHand instance + */ + ReqBetWeakHand.create = function create(properties) { + return new ReqBetWeakHand(properties); + }; + + /** + * Encodes the specified ReqBetWeakHand message. Does not implicitly {@link api.ReqBetWeakHand.verify|verify} messages. + * @function encode + * @memberof api.ReqBetWeakHand + * @static + * @param {api.IReqBetWeakHand} message ReqBetWeakHand message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReqBetWeakHand.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ReqBetWeakHand message, length delimited. Does not implicitly {@link api.ReqBetWeakHand.verify|verify} messages. + * @function encodeDelimited + * @memberof api.ReqBetWeakHand + * @static + * @param {api.IReqBetWeakHand} message ReqBetWeakHand message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReqBetWeakHand.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReqBetWeakHand message from the specified reader or buffer. + * @function decode + * @memberof api.ReqBetWeakHand + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {api.ReqBetWeakHand} ReqBetWeakHand + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReqBetWeakHand.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ReqBetWeakHand(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReqBetWeakHand message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof api.ReqBetWeakHand + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {api.ReqBetWeakHand} ReqBetWeakHand + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReqBetWeakHand.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReqBetWeakHand message. + * @function verify + * @memberof api.ReqBetWeakHand + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReqBetWeakHand.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ReqBetWeakHand message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof api.ReqBetWeakHand + * @static + * @param {Object.} object Plain object + * @returns {api.ReqBetWeakHand} ReqBetWeakHand + */ + ReqBetWeakHand.fromObject = function fromObject(object) { + if (object instanceof $root.api.ReqBetWeakHand) + return object; + return new $root.api.ReqBetWeakHand(); + }; + + /** + * Creates a plain object from a ReqBetWeakHand message. Also converts values to other types if specified. + * @function toObject + * @memberof api.ReqBetWeakHand + * @static + * @param {api.ReqBetWeakHand} message ReqBetWeakHand + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReqBetWeakHand.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ReqBetWeakHand to JSON. + * @function toJSON + * @memberof api.ReqBetWeakHand + * @instance + * @returns {Object.} JSON object + */ + ReqBetWeakHand.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReqBetWeakHand + * @function getTypeUrl + * @memberof api.ReqBetWeakHand + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReqBetWeakHand.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/api.ReqBetWeakHand"; + }; + + return ReqBetWeakHand; + })(); + + api.ReqBetDiscard = (function() { + + /** + * Properties of a ReqBetDiscard. * @memberof api - * @interface IReqDismissGameTable + * @interface IReqBetDiscard */ /** - * Constructs a new ReqDismissGameTable. + * Constructs a new ReqBetDiscard. * @memberof api - * @classdesc Represents a ReqDismissGameTable. - * @implements IReqDismissGameTable + * @classdesc Represents a ReqBetDiscard. + * @implements IReqBetDiscard * @constructor - * @param {api.IReqDismissGameTable=} [properties] Properties to set + * @param {api.IReqBetDiscard=} [properties] Properties to set */ - function ReqDismissGameTable(properties) { + function ReqBetDiscard(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6485,60 +7132,60 @@ export const api = $root.api = (() => { } /** - * Creates a new ReqDismissGameTable instance using the specified properties. + * Creates a new ReqBetDiscard instance using the specified properties. * @function create - * @memberof api.ReqDismissGameTable + * @memberof api.ReqBetDiscard * @static - * @param {api.IReqDismissGameTable=} [properties] Properties to set - * @returns {api.ReqDismissGameTable} ReqDismissGameTable instance + * @param {api.IReqBetDiscard=} [properties] Properties to set + * @returns {api.ReqBetDiscard} ReqBetDiscard instance */ - ReqDismissGameTable.create = function create(properties) { - return new ReqDismissGameTable(properties); + ReqBetDiscard.create = function create(properties) { + return new ReqBetDiscard(properties); }; /** - * Encodes the specified ReqDismissGameTable message. Does not implicitly {@link api.ReqDismissGameTable.verify|verify} messages. + * Encodes the specified ReqBetDiscard message. Does not implicitly {@link api.ReqBetDiscard.verify|verify} messages. * @function encode - * @memberof api.ReqDismissGameTable + * @memberof api.ReqBetDiscard * @static - * @param {api.IReqDismissGameTable} message ReqDismissGameTable message or plain object to encode + * @param {api.IReqBetDiscard} message ReqBetDiscard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReqDismissGameTable.encode = function encode(message, writer) { + ReqBetDiscard.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified ReqDismissGameTable message, length delimited. Does not implicitly {@link api.ReqDismissGameTable.verify|verify} messages. + * Encodes the specified ReqBetDiscard message, length delimited. Does not implicitly {@link api.ReqBetDiscard.verify|verify} messages. * @function encodeDelimited - * @memberof api.ReqDismissGameTable + * @memberof api.ReqBetDiscard * @static - * @param {api.IReqDismissGameTable} message ReqDismissGameTable message or plain object to encode + * @param {api.IReqBetDiscard} message ReqBetDiscard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReqDismissGameTable.encodeDelimited = function encodeDelimited(message, writer) { + ReqBetDiscard.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReqDismissGameTable message from the specified reader or buffer. + * Decodes a ReqBetDiscard message from the specified reader or buffer. * @function decode - * @memberof api.ReqDismissGameTable + * @memberof api.ReqBetDiscard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {api.ReqDismissGameTable} ReqDismissGameTable + * @returns {api.ReqBetDiscard} ReqBetDiscard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReqDismissGameTable.decode = function decode(reader, length) { + ReqBetDiscard.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ReqDismissGameTable(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ReqBetDiscard(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { @@ -6551,108 +7198,112 @@ export const api = $root.api = (() => { }; /** - * Decodes a ReqDismissGameTable message from the specified reader or buffer, length delimited. + * Decodes a ReqBetDiscard message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof api.ReqDismissGameTable + * @memberof api.ReqBetDiscard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {api.ReqDismissGameTable} ReqDismissGameTable + * @returns {api.ReqBetDiscard} ReqBetDiscard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReqDismissGameTable.decodeDelimited = function decodeDelimited(reader) { + ReqBetDiscard.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReqDismissGameTable message. + * Verifies a ReqBetDiscard message. * @function verify - * @memberof api.ReqDismissGameTable + * @memberof api.ReqBetDiscard * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReqDismissGameTable.verify = function verify(message) { + ReqBetDiscard.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a ReqDismissGameTable message from a plain object. Also converts values to their respective internal types. + * Creates a ReqBetDiscard message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof api.ReqDismissGameTable + * @memberof api.ReqBetDiscard * @static * @param {Object.} object Plain object - * @returns {api.ReqDismissGameTable} ReqDismissGameTable + * @returns {api.ReqBetDiscard} ReqBetDiscard */ - ReqDismissGameTable.fromObject = function fromObject(object) { - if (object instanceof $root.api.ReqDismissGameTable) + ReqBetDiscard.fromObject = function fromObject(object) { + if (object instanceof $root.api.ReqBetDiscard) return object; - return new $root.api.ReqDismissGameTable(); + return new $root.api.ReqBetDiscard(); }; /** - * Creates a plain object from a ReqDismissGameTable message. Also converts values to other types if specified. + * Creates a plain object from a ReqBetDiscard message. Also converts values to other types if specified. * @function toObject - * @memberof api.ReqDismissGameTable + * @memberof api.ReqBetDiscard * @static - * @param {api.ReqDismissGameTable} message ReqDismissGameTable + * @param {api.ReqBetDiscard} message ReqBetDiscard * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReqDismissGameTable.toObject = function toObject() { + ReqBetDiscard.toObject = function toObject() { return {}; }; /** - * Converts this ReqDismissGameTable to JSON. + * Converts this ReqBetDiscard to JSON. * @function toJSON - * @memberof api.ReqDismissGameTable + * @memberof api.ReqBetDiscard * @instance * @returns {Object.} JSON object */ - ReqDismissGameTable.prototype.toJSON = function toJSON() { + ReqBetDiscard.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReqDismissGameTable + * Gets the default type url for ReqBetDiscard * @function getTypeUrl - * @memberof api.ReqDismissGameTable + * @memberof api.ReqBetDiscard * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReqDismissGameTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReqBetDiscard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/api.ReqDismissGameTable"; + return typeUrlPrefix + "/api.ReqBetDiscard"; }; - return ReqDismissGameTable; + return ReqBetDiscard; })(); - api.ResDismissGameTable = (function() { + api.ResNoticePlayerLine = (function() { /** - * Properties of a ResDismissGameTable. + * Properties of a ResNoticePlayerLine. * @memberof api - * @interface IResDismissGameTable + * @interface IResNoticePlayerLine + * @property {number|Long|null} [playerId] ResNoticePlayerLine playerId + * @property {string|null} [line1] ResNoticePlayerLine line1 + * @property {string|null} [line2] ResNoticePlayerLine line2 + * @property {string|null} [line3] ResNoticePlayerLine line3 */ /** - * Constructs a new ResDismissGameTable. + * Constructs a new ResNoticePlayerLine. * @memberof api - * @classdesc Represents a ResDismissGameTable. - * @implements IResDismissGameTable + * @classdesc Represents a ResNoticePlayerLine. + * @implements IResNoticePlayerLine * @constructor - * @param {api.IResDismissGameTable=} [properties] Properties to set + * @param {api.IResNoticePlayerLine=} [properties] Properties to set */ - function ResDismissGameTable(properties) { + function ResNoticePlayerLine(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6660,63 +7311,119 @@ export const api = $root.api = (() => { } /** - * Creates a new ResDismissGameTable instance using the specified properties. + * ResNoticePlayerLine playerId. + * @member {number|Long} playerId + * @memberof api.ResNoticePlayerLine + * @instance + */ + ResNoticePlayerLine.prototype.playerId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResNoticePlayerLine line1. + * @member {string} line1 + * @memberof api.ResNoticePlayerLine + * @instance + */ + ResNoticePlayerLine.prototype.line1 = ""; + + /** + * ResNoticePlayerLine line2. + * @member {string} line2 + * @memberof api.ResNoticePlayerLine + * @instance + */ + ResNoticePlayerLine.prototype.line2 = ""; + + /** + * ResNoticePlayerLine line3. + * @member {string} line3 + * @memberof api.ResNoticePlayerLine + * @instance + */ + ResNoticePlayerLine.prototype.line3 = ""; + + /** + * Creates a new ResNoticePlayerLine instance using the specified properties. * @function create - * @memberof api.ResDismissGameTable + * @memberof api.ResNoticePlayerLine * @static - * @param {api.IResDismissGameTable=} [properties] Properties to set - * @returns {api.ResDismissGameTable} ResDismissGameTable instance + * @param {api.IResNoticePlayerLine=} [properties] Properties to set + * @returns {api.ResNoticePlayerLine} ResNoticePlayerLine instance */ - ResDismissGameTable.create = function create(properties) { - return new ResDismissGameTable(properties); + ResNoticePlayerLine.create = function create(properties) { + return new ResNoticePlayerLine(properties); }; /** - * Encodes the specified ResDismissGameTable message. Does not implicitly {@link api.ResDismissGameTable.verify|verify} messages. + * Encodes the specified ResNoticePlayerLine message. Does not implicitly {@link api.ResNoticePlayerLine.verify|verify} messages. * @function encode - * @memberof api.ResDismissGameTable + * @memberof api.ResNoticePlayerLine * @static - * @param {api.IResDismissGameTable} message ResDismissGameTable message or plain object to encode + * @param {api.IResNoticePlayerLine} message ResNoticePlayerLine message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResDismissGameTable.encode = function encode(message, writer) { + ResNoticePlayerLine.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.playerId != null && Object.hasOwnProperty.call(message, "playerId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.playerId); + if (message.line1 != null && Object.hasOwnProperty.call(message, "line1")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.line1); + if (message.line2 != null && Object.hasOwnProperty.call(message, "line2")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.line2); + if (message.line3 != null && Object.hasOwnProperty.call(message, "line3")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.line3); return writer; }; /** - * Encodes the specified ResDismissGameTable message, length delimited. Does not implicitly {@link api.ResDismissGameTable.verify|verify} messages. + * Encodes the specified ResNoticePlayerLine message, length delimited. Does not implicitly {@link api.ResNoticePlayerLine.verify|verify} messages. * @function encodeDelimited - * @memberof api.ResDismissGameTable + * @memberof api.ResNoticePlayerLine * @static - * @param {api.IResDismissGameTable} message ResDismissGameTable message or plain object to encode + * @param {api.IResNoticePlayerLine} message ResNoticePlayerLine message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResDismissGameTable.encodeDelimited = function encodeDelimited(message, writer) { + ResNoticePlayerLine.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResDismissGameTable message from the specified reader or buffer. + * Decodes a ResNoticePlayerLine message from the specified reader or buffer. * @function decode - * @memberof api.ResDismissGameTable + * @memberof api.ResNoticePlayerLine * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {api.ResDismissGameTable} ResDismissGameTable + * @returns {api.ResNoticePlayerLine} ResNoticePlayerLine * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResDismissGameTable.decode = function decode(reader, length) { + ResNoticePlayerLine.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ResDismissGameTable(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ResNoticePlayerLine(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.playerId = reader.int64(); + break; + } + case 11: { + message.line1 = reader.string(); + break; + } + case 12: { + message.line2 = reader.string(); + break; + } + case 13: { + message.line3 = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6726,89 +7433,141 @@ export const api = $root.api = (() => { }; /** - * Decodes a ResDismissGameTable message from the specified reader or buffer, length delimited. + * Decodes a ResNoticePlayerLine message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof api.ResDismissGameTable + * @memberof api.ResNoticePlayerLine * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {api.ResDismissGameTable} ResDismissGameTable + * @returns {api.ResNoticePlayerLine} ResNoticePlayerLine * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResDismissGameTable.decodeDelimited = function decodeDelimited(reader) { + ResNoticePlayerLine.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResDismissGameTable message. + * Verifies a ResNoticePlayerLine message. * @function verify - * @memberof api.ResDismissGameTable + * @memberof api.ResNoticePlayerLine * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResDismissGameTable.verify = function verify(message) { + ResNoticePlayerLine.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.playerId != null && message.hasOwnProperty("playerId")) + if (!$util.isInteger(message.playerId) && !(message.playerId && $util.isInteger(message.playerId.low) && $util.isInteger(message.playerId.high))) + return "playerId: integer|Long expected"; + if (message.line1 != null && message.hasOwnProperty("line1")) + if (!$util.isString(message.line1)) + return "line1: string expected"; + if (message.line2 != null && message.hasOwnProperty("line2")) + if (!$util.isString(message.line2)) + return "line2: string expected"; + if (message.line3 != null && message.hasOwnProperty("line3")) + if (!$util.isString(message.line3)) + return "line3: string expected"; return null; }; /** - * Creates a ResDismissGameTable message from a plain object. Also converts values to their respective internal types. + * Creates a ResNoticePlayerLine message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof api.ResDismissGameTable + * @memberof api.ResNoticePlayerLine * @static * @param {Object.} object Plain object - * @returns {api.ResDismissGameTable} ResDismissGameTable + * @returns {api.ResNoticePlayerLine} ResNoticePlayerLine */ - ResDismissGameTable.fromObject = function fromObject(object) { - if (object instanceof $root.api.ResDismissGameTable) + ResNoticePlayerLine.fromObject = function fromObject(object) { + if (object instanceof $root.api.ResNoticePlayerLine) return object; - return new $root.api.ResDismissGameTable(); + let message = new $root.api.ResNoticePlayerLine(); + if (object.playerId != null) + if ($util.Long) + (message.playerId = $util.Long.fromValue(object.playerId)).unsigned = false; + else if (typeof object.playerId === "string") + message.playerId = parseInt(object.playerId, 10); + else if (typeof object.playerId === "number") + message.playerId = object.playerId; + else if (typeof object.playerId === "object") + message.playerId = new $util.LongBits(object.playerId.low >>> 0, object.playerId.high >>> 0).toNumber(); + if (object.line1 != null) + message.line1 = String(object.line1); + if (object.line2 != null) + message.line2 = String(object.line2); + if (object.line3 != null) + message.line3 = String(object.line3); + return message; }; /** - * Creates a plain object from a ResDismissGameTable message. Also converts values to other types if specified. + * Creates a plain object from a ResNoticePlayerLine message. Also converts values to other types if specified. * @function toObject - * @memberof api.ResDismissGameTable + * @memberof api.ResNoticePlayerLine * @static - * @param {api.ResDismissGameTable} message ResDismissGameTable + * @param {api.ResNoticePlayerLine} message ResNoticePlayerLine * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResDismissGameTable.toObject = function toObject() { - return {}; + ResNoticePlayerLine.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.playerId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.playerId = options.longs === String ? "0" : 0; + object.line1 = ""; + object.line2 = ""; + object.line3 = ""; + } + if (message.playerId != null && message.hasOwnProperty("playerId")) + if (typeof message.playerId === "number") + object.playerId = options.longs === String ? String(message.playerId) : message.playerId; + else + object.playerId = options.longs === String ? $util.Long.prototype.toString.call(message.playerId) : options.longs === Number ? new $util.LongBits(message.playerId.low >>> 0, message.playerId.high >>> 0).toNumber() : message.playerId; + if (message.line1 != null && message.hasOwnProperty("line1")) + object.line1 = message.line1; + if (message.line2 != null && message.hasOwnProperty("line2")) + object.line2 = message.line2; + if (message.line3 != null && message.hasOwnProperty("line3")) + object.line3 = message.line3; + return object; }; /** - * Converts this ResDismissGameTable to JSON. + * Converts this ResNoticePlayerLine to JSON. * @function toJSON - * @memberof api.ResDismissGameTable + * @memberof api.ResNoticePlayerLine * @instance * @returns {Object.} JSON object */ - ResDismissGameTable.prototype.toJSON = function toJSON() { + ResNoticePlayerLine.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResDismissGameTable + * Gets the default type url for ResNoticePlayerLine * @function getTypeUrl - * @memberof api.ResDismissGameTable + * @memberof api.ResNoticePlayerLine * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResDismissGameTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResNoticePlayerLine.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/api.ResDismissGameTable"; + return typeUrlPrefix + "/api.ResNoticePlayerLine"; }; - return ResDismissGameTable; + return ResNoticePlayerLine; })(); return api; diff --git a/src/api/wsapi.js b/src/api/wsapi.js index 8e73a80..1070613 100644 --- a/src/api/wsapi.js +++ b/src/api/wsapi.js @@ -3,6 +3,9 @@ import { api } from './proto' export const aa = msg => sendPromise(msg) +export const reqCreateTable = ({players, robots, texasType, bigBlind}) => + sendPromise(api.ReqCreateTable.create({players, robots, texasType, bigBlind})); + // 大厅桌面预览 export const reqLobbyView = () => sendPromise(api.ReqLobbyView.create()); diff --git a/src/app.scss b/src/app.scss index f357e54..4d065b1 100644 --- a/src/app.scss +++ b/src/app.scss @@ -7,3 +7,10 @@ body { margin: 0 auto; background: #F5F5F5; } + +// NutUI-React +:root { + --nutui-brand-color: #1BCE7D; + --nutui-brand-color-start: #1BCE7D; + --nutui-brand-color-end: #1BCE7D; +} diff --git a/src/pages/lobby/lobby.jsx b/src/pages/lobby/lobby.jsx index b05bcd6..f1dab53 100644 --- a/src/pages/lobby/lobby.jsx +++ b/src/pages/lobby/lobby.jsx @@ -130,32 +130,32 @@ class Lobby extends Component { // // ); - return ( - - {/* */} - - - 默认样式 - 选中 - 未选中 - - - 推荐展示样式 - - - {this.state.list.map((item, i) => { - return ( - - ) - })} - - - - - - ); + // return ( + // + // {/* */} + // + // + // 默认样式 + // 选中 + // 未选中 + // + // + // 推荐展示样式 + // + // + // {this.state.list.map((item, i) => { + // return ( + // + // ) + // })} + // + // + // + // + // + // ); return ( diff --git a/src/pages/new_table/new_table.jsx b/src/pages/new_table/new_table.jsx index eba748d..6b12c50 100644 --- a/src/pages/new_table/new_table.jsx +++ b/src/pages/new_table/new_table.jsx @@ -1,12 +1,13 @@ import React, { Component, useState } from 'react' -import { View, Text, Image, Button } from '@tarojs/components' -import { Popup, Picker } from '@nutui/nutui-react-taro'; +import { View, Text, Image, Button, Slider } from '@tarojs/components' +import { Popup, Picker, Range, Radio } from '@nutui/nutui-react-taro'; import { useSelector } from 'react-redux' +import Taro from '@tarojs/taro'; import { redirectTo } from '@/utils/application' import './new_table.scss' import Title from '@/components/title' -import { sendPromise } from '@/api/websocket' +import { reqCreateTable } from '@/api/wsapi' import proto from '@/api/proto'; import { showToast } from '@/utils/application' import userIcon from '@/assets/icon/user-2.svg' @@ -20,6 +21,8 @@ function NewTable() { const {username, nickname, avatar} = useSelector(state => state.user); const [submitLoading, setSubmitLoading] = useState(false); const [choosingPlace, setChoosingPlace] = useState(-1); + const [texasType, setTexasType] = useState(1); + const [bigBlind, setBigBlind] = useState(2); const [players, setPlayers] = useState([0,0,0,0,0,0]); // 0空位,1玩家,2机器人 const playerRows = players.reduce((arr, item, idx) => { @@ -30,16 +33,22 @@ function NewTable() { return arr; }, []); + const choosePlayer = (playerPos) => { + players[playerPos] = 1; + setPlayers([...players]) + // setPlayers + } + const createTable = async () => { if (submitLoading) { return } setSubmitLoading(true) - const req = ReqCreateTable.create({ - players: players.filter(type => type === 1).length, - robots: players.filter(type => type === 2).length - }) try { - const _ = await sendPromise(req) + const _ = await reqCreateTable({ + texasType, bigBlind, + players: players.filter(type => type === 1).length, + robots: players.filter(type => type === 2).length, + }); redirectTo({url: '/pages/table/table'}) }catch(err) { showToast({title: err}) @@ -50,7 +59,33 @@ function NewTable() { return ( - + <Title title={"Create New Table"} bgColor={true} /> + <View className="game-props"> + <View className="prop-wrap"> + <View className="prop-k"><Text>牌局类型:</Text></View> + <View className="prop-v"> + <Radio.RadioGroup value={texasType} direction="horizontal" onChange={setTexasType}> + <Radio value={1} iconSize={Taro.pxTransform(16)}>限注德州扑克</Radio> + <Radio value={2} iconSize={Taro.pxTransform(16)}>底池限制德州扑克</Radio> + <Radio value={3} iconSize={Taro.pxTransform(16)}>无限制德州扑克</Radio> + </Radio.RadioGroup> + </View> + </View> + <View className="prop-wrap"> + <View className="prop-k"><Text>大盲注额:</Text></View> + <View className="prop-v"> + <Range modelValue={bigBlind} min={2} max={200} step={2} + hiddenRange={true} hiddenTag={false} + activeColor="#1BCE7D" inactiveColor="#D8D8D8" + button={<View className="range-custom-button"><Text>{bigBlind}</Text></View>} + onChange={v => setBigBlind(v)}/> + </View> + </View> + <View className="prop-wrap"> + <View className="prop-k"><Text>入场金额:</Text></View> + <View className="prop-v amount-in"><Text>{bigBlind * 100}</Text></View> + </View> + </View> <View className="nt-wrap"> { playerRows.map((row, i) => ( @@ -58,10 +93,11 @@ function NewTable() { { row.map((player, j) => ( player.item === 0 - ? <View key={j} onClick={() => setChoosingPlace(player.index)} className='player empty-player'><Image className="empty-icon" src={addIcon} /></View> + ? <View key={j} onClick={() => choosePlayer(player.index)} className='player empty-player'><Image className="empty-icon" src={addIcon} /></View> : <View key={j} className="player-wrap"> <View className="player-icon"><Image className="player-icon-img" src={player.item === 1 ? userIcon : robotIcon} /></View> - <View className="close-icon" onClick={() => { + <View className="close-icon" onClick={(e) => { + e.stopPropagation(); players[player.index] = 0; setPlayers([...players]); }}><Image className="close-icon-img" src={closeIcon} /></View> @@ -86,7 +122,7 @@ function NewTable() { </View> </View> - <Picker + {/* <Picker title='' isVisible={choosingPlace > -1} listData={[{value: 1, text: 'Player'}, {value: 2, text: 'Robot'}]} @@ -95,7 +131,7 @@ function NewTable() { setPlayers([...players]); }} onClose={() => setChoosingPlace(-1)} - /> + /> */} </View> ) } diff --git a/src/pages/new_table/new_table.scss b/src/pages/new_table/new_table.scss index 60042da..f3b60e7 100644 --- a/src/pages/new_table/new_table.scss +++ b/src/pages/new_table/new_table.scss @@ -1,4 +1,45 @@ .nt { + .prop-wrap { + display: flex; + margin-top: 20px; + } + .prop-k { + font-size: 14px; + width: 120px; + text-align: right; + height: 20px; + line-height: 20px; + color: #3D3D3D; + font-weight: bold; + padding-right: 10px; + } + .prop-v { + width: 280px; + display: flex; + justify-content: center; + align-items: center; + } + .range-custom-button { + width: 30px; + height: 22px; + font-size: 12px; + line-height: 22px; + font-weight: bold; + color: #3D3D3D; + text-align: center; + border-radius: 50%; + background-color: #fff; + border: 2px solid #1BCE7D; + } + .amount-in { + text-align: left; + justify-content: flex-start; + line-height: 20px; + font-size: 16px; + color: #FF4400; + font-weight: bold; + } + .nt-wrap { padding: 0 11px 0 11px; } @@ -8,7 +49,7 @@ // align-content: space-around; flex-flow: row wrap; width: 405px; - margin: 46px auto 0 auto; + margin: 26px auto 0 auto; } .player-wrap { // flex: 0 0 50%;