1 line
15 KiB
JSON
1 line
15 KiB
JSON
{"ast":null,"code":"// 百家乐&龙虎\nconst baccaratData = {\n key: [\"banker_amount\", \"player_amount\", \"tie_amount\", \"banker_pair_amount\", \"player_pair_amount\", \"big_amount\", \"small_amount\", \"luck_six_amount\"],\n amount: {\n banker_amount: 0,\n player_amount: 0,\n tie_amount: 0,\n banker_pair_amount: 0,\n player_pair_amount: 0,\n big_amount: 0,\n small_amount: 0,\n luck_six_amount: 0\n },\n array: {\n banker_amount: [],\n player_amount: [],\n tie_amount: [],\n banker_pair_amount: [],\n player_pair_amount: [],\n big_amount: [],\n small_amount: [],\n luck_six_amount: []\n }\n};\n// 牛牛\nconst nnData = {\n key: [\"amount_player_1\", \"amount_player_1_banker\", \"amount_player_1_banker_times\", \"amount_player_1_times\", \"amount_player_2\", \"amount_player_2_banker\", \"amount_player_2_banker_times\", \"amount_player_2_times\", \"amount_player_3\", \"amount_player_3_banker\", \"amount_player_3_banker_times\", \"amount_player_3_times\"],\n amount: {\n amount_player_1: 0,\n amount_player_1_banker: 0,\n amount_player_1_banker_times: 0,\n amount_player_1_times: 0,\n amount_player_2: 0,\n amount_player_2_banker: 0,\n amount_player_2_banker_times: 0,\n amount_player_2_times: 0,\n amount_player_3: 0,\n amount_player_3_banker: 0,\n amount_player_3_banker_times: 0,\n amount_player_3_times: 0\n },\n array: {\n amount_player_1: [],\n amount_player_1_banker: [],\n amount_player_1_banker_times: [],\n amount_player_1_times: [],\n amount_player_2: [],\n amount_player_2_banker: [],\n amount_player_2_banker_times: [],\n amount_player_2_times: [],\n amount_player_3: [],\n amount_player_3_banker: [],\n amount_player_3_banker_times: [],\n amount_player_3_times: []\n }\n};\n\n// 色碟\nconst toningData = {\n key: [\"toning_zero\", \"toning_four\", \"toning_one\", \"toning_three\", \"toning_big\", \"toning_small\", \"toning_singular\", \"toning_plural\"],\n amount: {\n toning_zero: 0,\n toning_four: 0,\n toning_one: 0,\n toning_three: 0,\n toning_big: 0,\n toning_small: 0,\n toning_singular: 0,\n toning_plural: 0\n },\n array: {\n toning_zero: [],\n toning_four: [],\n toning_one: [],\n toning_three: [],\n toning_big: [],\n toning_small: [],\n toning_singular: [],\n toning_plural: []\n }\n};\n// 骰宝\nconst diceData = {\n key: [\"small\", \"big\", \"singular\", \"plural\", \"two_11\", \"two_22\", \"two_33\", \"two_44\", \"two_55\", \"two_66\", \"leopard\", \"three_111\", \"three_222\", \"three_333\", \"three_444\", \"three_555\", \"three_666\", \"number_4\", \"number_5\", \"number_6\", \"number_7\", \"number_8\", \"number_9\", \"number_10\", \"number_11\", \"number_12\", \"number_13\", \"number_14\", \"number_15\", \"number_16\", \"number_17\", \"two_12\", \"two_13\", \"two_14\", \"two_15\", \"two_16\", \"two_23\", \"two_24\", \"two_25\", \"two_26\", \"two_34\", \"two_35\", \"two_36\", \"two_45\", \"two_46\", \"two_56\", \"living_1\", \"living_2\", \"living_3\", \"living_4\", \"living_5\", \"living_6\"],\n amount: {\n small: 0,\n big: 0,\n singular: 0,\n plural: 0,\n two_11: 0,\n two_22: 0,\n two_33: 0,\n two_44: 0,\n two_55: 0,\n two_66: 0,\n leopard: 0,\n three_111: 0,\n three_222: 0,\n three_333: 0,\n three_444: 0,\n three_555: 0,\n three_666: 0,\n number_4: 0,\n number_5: 0,\n number_6: 0,\n number_7: 0,\n number_8: 0,\n number_9: 0,\n number_10: 0,\n number_11: 0,\n number_12: 0,\n number_13: 0,\n number_14: 0,\n number_15: 0,\n number_16: 0,\n number_17: 0,\n two_12: 0,\n two_13: 0,\n two_14: 0,\n two_15: 0,\n two_16: 0,\n two_23: 0,\n two_24: 0,\n two_25: 0,\n two_26: 0,\n two_34: 0,\n two_35: 0,\n two_36: 0,\n two_45: 0,\n two_46: 0,\n two_56: 0,\n living_1: 0,\n living_2: 0,\n living_3: 0,\n living_4: 0,\n living_5: 0,\n living_6: 0\n },\n array: {\n small: [],\n big: [],\n singular: [],\n plural: [],\n two_11: [],\n two_22: [],\n two_33: [],\n two_44: [],\n two_55: [],\n two_66: [],\n leopard: [],\n three_111: [],\n three_222: [],\n three_333: [],\n three_444: [],\n three_555: [],\n three_666: [],\n number_4: [],\n number_5: [],\n number_6: [],\n number_7: [],\n number_8: [],\n number_9: [],\n number_10: [],\n number_11: [],\n number_12: [],\n number_13: [],\n number_14: [],\n number_15: [],\n number_16: [],\n number_17: [],\n two_12: [],\n two_13: [],\n two_14: [],\n two_15: [],\n two_16: [],\n two_23: [],\n two_24: [],\n two_25: [],\n two_26: [],\n two_34: [],\n two_35: [],\n two_36: [],\n two_45: [],\n two_46: [],\n two_56: [],\n living_1: [],\n living_2: [],\n living_3: [],\n living_4: [],\n living_5: [],\n living_6: []\n }\n};\n\n// 轮盘\nconst rouletteData = {\n key: [\"low\", \"even\", \"red\", \"black\", \"odd\", \"high\", \"column_1\", \"column_2\", \"column_3\", \"dozen_1\", \"dozen_2\", \"dozen_3\", \"theThird\", \"orphans\", \"neighborsOfZero\", \"zeroGame\", \"straight_0\", \"straight_1\", \"straight_2\", \"straight_3\", \"straight_4\", \"straight_5\", \"straight_6\", \"straight_7\", \"straight_8\", \"straight_9\", \"straight_10\", \"straight_11\", \"straight_12\", \"straight_13\", \"straight_14\", \"straight_15\", \"straight_16\", \"straight_17\", \"straight_18\", \"straight_19\", \"straight_20\", \"straight_21\", \"straight_22\", \"straight_23\", \"straight_24\", \"straight_25\", \"straight_26\", \"straight_27\", \"straight_28\", \"straight_29\", \"straight_30\", \"straight_31\", \"straight_32\", \"straight_33\", \"straight_34\", \"straight_35\", \"straight_36\"],\n amount: {\n low: 0,\n even: 0,\n red: 0,\n black: 0,\n odd: 0,\n high: 0,\n column_1: 0,\n column_2: 0,\n column_3: 0,\n dozen_1: 0,\n dozen_2: 0,\n dozen_3: 0,\n theThird: 0,\n orphans: 0,\n neighborsOfZero: 0,\n zeroGame: 0,\n straight_0: 0,\n straight_1: 0,\n straight_2: 0,\n straight_3: 0,\n straight_4: 0,\n straight_5: 0,\n straight_6: 0,\n straight_7: 0,\n straight_8: 0,\n straight_9: 0,\n straight_10: 0,\n straight_11: 0,\n straight_12: 0,\n straight_13: 0,\n straight_14: 0,\n straight_15: 0,\n straight_16: 0,\n straight_17: 0,\n straight_18: 0,\n straight_19: 0,\n straight_20: 0,\n straight_21: 0,\n straight_22: 0,\n straight_23: 0,\n straight_24: 0,\n straight_25: 0,\n straight_26: 0,\n straight_27: 0,\n straight_28: 0,\n straight_29: 0,\n straight_31: 0,\n straight_32: 0,\n straight_33: 0,\n straight_34: 0,\n straight_35: 0,\n straight_36: 0\n },\n array: {\n low: [],\n even: [],\n red: [],\n black: [],\n odd: [],\n high: [],\n column_1: [],\n column_2: [],\n column_3: [],\n dozen_1: [],\n dozen_2: [],\n dozen_3: [],\n theThird: [],\n orphans: [],\n neighborsOfZero: [],\n zeroGame: [],\n straight_0: [],\n straight_1: [],\n straight_2: [],\n straight_3: [],\n straight_4: [],\n straight_5: [],\n straight_6: [],\n straight_7: [],\n straight_8: [],\n straight_9: [],\n straight_10: [],\n straight_11: [],\n straight_12: [],\n straight_13: [],\n straight_14: [],\n straight_15: [],\n straight_16: [],\n straight_17: [],\n straight_18: [],\n straight_19: [],\n straight_20: [],\n straight_21: [],\n straight_22: [],\n straight_23: [],\n straight_24: [],\n straight_25: [],\n straight_26: [],\n straight_27: [],\n straight_28: [],\n straight_29: [],\n straight_31: [],\n straight_32: [],\n straight_33: [],\n straight_34: [],\n straight_35: [],\n straight_36: []\n }\n};\nconst breakOff = data => {\n let new_data;\n try {\n new_data = JSON.parse(JSON.stringify(data));\n } catch (err) {\n new_data = data;\n }\n return new_data;\n};\nconst sendScanResult = (tableData, data) => {\n if (tableData.game_id == 4 || tableData.game_id == 5) {\n const order_num = parseInt(data.round.order_num);\n if (tableData.game_id == 5) {\n tableData.tc_result = tableData.tc_result ? tableData.tc_result : {};\n }\n if (tableData.nn_result) {\n tableData.nn_result = tableData.nn_result ? tableData.nn_result : {};\n }\n if (order_num == 11) {\n tableData.card_info.player_1_card_1 = data.round.card;\n } else if (order_num == 12) {\n tableData.card_info.player_1_card_2 = data.round.card;\n } else if (order_num == 13) {\n tableData.card_info.player_1_card_3 = data.round.card;\n if (tableData.game_id == 5) {\n tableData.tc_result.player_1_result = data.round.result;\n }\n } else if (order_num == 14) {\n tableData.card_info.player_1_card_4 = data.round.card;\n } else if (order_num == 15) {\n tableData.card_info.player_1_card_5 = data.round.card;\n if (tableData.game_id == 4) {\n tableData.nn_result.player_1_result = data.round.result;\n }\n } else if (order_num == 21) {\n tableData.card_info.player_2_card_1 = data.round.card;\n } else if (order_num == 22) {\n tableData.card_info.player_2_card_2 = data.round.card;\n } else if (order_num == 23) {\n tableData.card_info.player_2_card_3 = data.round.card;\n if (tableData.game_id == 5) {\n tableData.tc_result.player_2_result = data.round.result;\n }\n } else if (order_num == 24) {\n tableData.card_info.player_2_card_4 = data.round.card;\n } else if (order_num == 25) {\n tableData.card_info.player_2_card_5 = data.round.card;\n if (tableData.game_id == 4) {\n tableData.nn_result.player_2_result = data.round.result;\n }\n } else if (order_num == 31) {\n tableData.card_info.player_3_card_1 = data.round.card;\n } else if (order_num == 32) {\n tableData.card_info.player_3_card_2 = data.round.card;\n } else if (order_num == 33) {\n tableData.card_info.player_3_card_3 = data.round.card;\n if (tableData.game_id == 5) {\n tableData.tc_result.player_3_result = data.round.result;\n }\n } else if (order_num == 34) {\n tableData.card_info.player_3_card_4 = data.round.card;\n } else if (order_num == 35) {\n tableData.card_info.player_3_card_5 = data.round.card;\n if (tableData.game_id == 4) {\n tableData.nn_result.player_3_result = data.round.result;\n }\n } else if (order_num == 41) {\n tableData.card_info.banker_card_1 = data.round.card;\n } else if (order_num == 42) {\n tableData.card_info.banker_card_2 = data.round.card;\n } else if (order_num == 43) {\n tableData.card_info.banker_card_3 = data.round.card;\n if (tableData.game_id == 5) {\n tableData.tc_result.banker_result = data.round.result;\n }\n } else if (order_num == 44) {\n tableData.card_info.banker_card_4 = data.round.card;\n } else if (order_num == 45) {\n tableData.card_info.banker_card_5 = data.round.card;\n if (tableData.game_id == 4) {\n tableData.nn_result.banker_result = data.round.result;\n }\n } else if (order_num == 0) {\n tableData.card_info.card_first = data.round.card;\n }\n } else if (tableData.game_id == 2) {\n const position = parseInt(data.round.position);\n if (position == 21) {\n tableData.card_info.banker_1 = data.round.card;\n } else if (position == 11) {\n tableData.card_info.player_1 = data.round.card;\n }\n } else if (tableData.game_id == 1) {\n const position = parseInt(data.round.position);\n if (position == 21) {\n tableData.card_info.banker_1 = data.round.card;\n } else if (position == 22) {\n tableData.card_info.banker_2 = data.round.card;\n } else if (position == 23) {\n tableData.card_info.banker_3 = data.round.card;\n } else if (position == 11) {\n tableData.card_info.player_1 = data.round.card;\n } else if (position == 12) {\n tableData.card_info.player_2 = data.round.card;\n } else if (position == 13) {\n tableData.card_info.player_3 = data.round.card;\n }\n }\n};\nconst resetCardInfo = tableData => {\n if (tableData.is_scavenging == 1) {\n tableData.bet_status = 0;\n if (!tableData.card_info) {\n tableData.card_info = {};\n }\n if (tableData.game_id == 4 || tableData.game_id == 5) {\n tableData.card_info.player_1_card_1 = 0;\n tableData.card_info.player_1_card_2 = 0;\n tableData.card_info.player_1_card_3 = 0;\n tableData.card_info.player_1_card_4 = 0;\n tableData.card_info.player_1_card_5 = 0;\n tableData.card_info.player_2_card_1 = 0;\n tableData.card_info.player_2_card_2 = 0;\n tableData.card_info.player_2_card_3 = 0;\n tableData.card_info.player_2_card_4 = 0;\n tableData.card_info.player_2_card_5 = 0;\n tableData.card_info.player_3_card_1 = 0;\n tableData.card_info.player_3_card_2 = 0;\n tableData.card_info.player_3_card_3 = 0;\n tableData.card_info.player_3_card_4 = 0;\n tableData.card_info.player_3_card_5 = 0;\n tableData.card_info.banker_card_1 = 0;\n tableData.card_info.banker_card_2 = 0;\n tableData.card_info.banker_card_3 = 0;\n tableData.card_info.banker_card_4 = 0;\n tableData.card_info.banker_card_5 = 0;\n tableData.card_info.card_first = 0;\n } else if (tableData.game_id == 2) {\n tableData.card_info.player_1 = 0;\n tableData.card_info.banker_1 = 0;\n } else if (tableData.game_id == 1) {\n tableData.card_info.banker_1 = 0;\n tableData.card_info.banker_2 = 0;\n tableData.card_info.banker_3 = 0;\n tableData.card_info.player_1 = 0;\n tableData.card_info.player_2 = 0;\n tableData.card_info.player_3 = 0;\n }\n }\n};\nconst updateBetAmount = (tableData, data) => {\n if (!tableData.bet_amount_msg) {\n tableData.bet_amount_msg = {};\n }\n let key = [];\n if (tableData.game_id == 1 || tableData.game_id == 2) {\n key = [...baccaratData.key];\n } else if (tableData.game_id == 4 || tableData.game_id == 5) {\n key = [...nnData.key];\n } else if (tableData.game_id == 6) {\n key = [...toningData.key];\n } else if (tableData.game_id == 7) {\n key = [...diceData.key];\n }\n if (key.length) {\n key.forEach(v => {\n if (data && data.betAmountMsg && data.betAmountMsg[v]) {\n tableData.bet_amount_msg[v] = (tableData.bet_amount_msg[v] || 0) + data.betAmountMsg[v];\n }\n });\n }\n};\nexport { sendScanResult, resetCardInfo, updateBetAmount, breakOff, baccaratData, nnData, diceData, toningData, rouletteData };","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]} |