Card face comparison device and method

文档序号:1452589 发布日期:2020-02-21 浏览:36次 中文

阅读说明:本技术 牌面比对装置及方法 (Card face comparison device and method ) 是由 贺改梅 易昕 于 2019-10-30 设计创作,主要内容包括:本发明公开了一种牌面比对装置及方法。上述装置包括:输入接口模块,用于获取当前各个用户的标识信息、牌面花色信息、以及牌面点数信息;存储模块,用于存储每个用户对应的牌面数据、花色数据、顺子数据、同点数据以及花牌数据;第一判断模块,用于判断确定每个用户对应的基础牌面信息;第二判断模块,用于根据基础牌面信息进行组合并判断,确定每个用户对应的组合牌面信息;权值确定模块,用于根据组合牌面信息确定每个用户对应的牌面级别值、花色值和点值,并计算确定每个用户对应的综合权值;比对模块,用于将各个用户对应的综合权值进行比对,获取比对结果。根据上述技术方案,实现了牌类游戏的牌面比对,通用性和可移植性强。(The invention discloses a card face comparison device and a card face comparison method. The above-mentioned device includes: the input interface module is used for acquiring the identification information, the card color information and the card point information of each current user; the storage module is used for storing card face data, suit data, order data, same-point data and suited data corresponding to each user; the first judgment module is used for judging and determining the basic card information corresponding to each user; the second judgment module is used for combining and judging according to the basic brand information and determining the combined brand information corresponding to each user; the weight determination module is used for determining a brand grade value, a suit value and a point value corresponding to each user according to the combined brand information and calculating and determining a comprehensive weight corresponding to each user; and the comparison module is used for comparing the comprehensive weight corresponding to each user to obtain a comparison result. According to the technical scheme, card-to-card comparison of card games is realized, and the universality and the portability are strong.)

1. A card face comparison device, comprising:

the input interface module is used for acquiring the identification information, the card color information and the card point information of each current user;

the storage module is used for storing card face data, suit data, order data, same-point data and suited data corresponding to each user according to the acquired identification information, the card face suit information and the card face point information;

the first judgment module is used for judging according to the card face data, the suit data, the order data, the same-point data and the suited data and determining the basic card face information corresponding to each user;

the second judgment module is used for combining and judging according to the basic brand information and determining the combined brand information corresponding to each user;

the weight determination module is used for determining a card grade value, a suit value and a point value corresponding to each user according to the combined card information, and calculating and determining a comprehensive weight corresponding to each user by adopting the grade value, the suit value and the point value;

and the comparison module is used for comparing the comprehensive weight corresponding to each user to obtain a comparison result.

2. The card face comparison device of claim 1, further comprising:

and the configuration module is used for responding to the operation of a user, and configuring the game type, the card type and the card level value corresponding to the game type, various flower color weights and the numerical value corresponding to the card point number.

3. The card face comparison device of claim 1, wherein the first determination module comprises:

the same-suit judging unit is used for judging whether the maximum value of the number of cards with the same suit in the suit data of the current user is larger than or equal to the total number of the cards held by the user, and if so, the cards are judged to be the same suit;

the same-point judging unit is used for judging the number of pairs, and/or the number of three pieces, and/or the number of four pieces of cards with the same point in the same-point data of the current user, and judging whether the cards held by the current user are cards with different points according to the number of pairs, the number of three pieces, and the number of four pieces of cards with the same point;

the rank judging unit is used for judging whether the difference value between the total number of the cards held by the current user and the maximum point difference value in the rank data is equal to 1, if so, judging whether the cards held by the current user are cards with different points, and if so, judging the cards to be ranks;

and the card-playing judging unit is used for judging whether the number of the cards in the card-playing data of the current user is equal to the total number of the cards held by the user, and if so, judging the cards to be royal cards, wherein the cards are cards with the number larger than or equal to the preset number.

4. The card face comparison device of claim 1, wherein the weight determination module comprises:

the card level determining unit is used for inquiring the information of the card type and the card level value corresponding to the preset game type and determining the level value J corresponding to the combined card information of the current user;

the system comprises a flower color value determining unit, a flower color value determining unit and a flower color value determining unit, wherein the flower color value determining unit is used for determining the flower color value H of a current user according to flower color data of the current user, when cards held by the current user are of the same flower, a flower color weight value corresponding to the flower color is obtained from various pre-configured flower color weight values, and when the cards held by the current user are of non-same flower, a pre-configured flower color weight value coefficient m is used as the flower color weight value H of the user;

the point value determining unit is used for taking the highest-grade card face point in the card face types of the current user as a point value D of the user;

and the weight calculation unit is used for calculating and determining a comprehensive weight corresponding to each user by adopting a level value J, a flower color value H and a point value D, wherein the weight coefficient of the level value J is greater than that of the flower color value H, and the weight coefficient of the flower color value H is greater than that of the point value D.

5. The card face comparison device of claim 4, wherein the weight calculation unit determines the comprehensive weight corresponding to each user by one of:

when the subsuits are sorted from large to small, and the subsuit weight value corresponding to each subsuit is configured to be sorted from small to large, the comprehensive weight value is J a + (m-H) b + D c, wherein b is the weight coefficient of the flowery value H, b is set to be a value larger than max (D c), c is the weight coefficient of the point value D, a is the weight coefficient of the grade value J, a is set to be a value larger than max ((m-H) b), m is set to be a value larger than max (H), and a, b, c and m are all natural numbers;

when the subsuits are sorted from big to small, and the subsuit weight value corresponding to each subsuit is configured to be sorted from big to small, the comprehensive weight value is J a + H b + D c, wherein b is the weight coefficient of the subsuit color value H, b is set to be a value larger than max (D c), c is the weight coefficient of the point value D, a is the weight coefficient of the grade value J, a is set to be a value larger than max ((m-H) b), and a, b, c and m are all natural numbers.

6. A card face comparison method is characterized by comprising the following steps:

acquiring identification information, card face color information and card face point information of each current user;

card face data, suit data, order data, same-point data and suited data corresponding to each user are stored according to the acquired identification information, the card face suit information and the card face point information;

judging according to the card face data, the suit data, the order data, the same-point data and the suited data, and determining basic card face information corresponding to each user;

combining and judging according to the basic brand information, and determining combined brand information corresponding to each user;

determining a card grade value, a suit value and a point value corresponding to each user according to the combined card information, and calculating and determining a comprehensive weight value corresponding to each user by adopting the grade value, the suit value and the point value;

and comparing the comprehensive weight values corresponding to the users to obtain comparison results.

7. The card comparing method of claim 6, wherein before obtaining the identification information, the card suit information, and the card rank information of each current user, the method further comprises:

responding to the operation of a user, and configuring a game type, a card type and a card level value corresponding to the game type, various suit weights and numerical values corresponding to the card points.

8. The card face comparison method of claim 6, wherein the determining the basic card face information corresponding to each user according to the card face data, the suit data, the rank data, the same-rank data and the suited data comprises:

judging whether the maximum value of the number of cards with the same suit in the suit data of the current user is larger than or equal to the total number of cards held by the user, if so, judging that the cards are of the same suit;

judging the number of pairs, and/or the number of three cards, and/or the number of four cards held by the user according to the number of the same-point cards in the same-point data of the current user, and judging whether the cards held by the current user are cards with different points according to the number of pairs, the number of three cards, and the number of four cards held by the user;

judging whether the difference value between the total number of the cards held by the current user and the maximum point difference value in the rank data is equal to 1, if so, judging whether the cards held by the current user are cards with different points, and if so, judging the cards to be ranks;

judging whether the number of the cards in the card data of the current user is equal to the total number of the cards held by the user, if so, judging the cards to be royal cards, wherein the cards are the cards with the number larger than or equal to a preset number.

9. The card comparing method of claim 6, wherein determining a card rank value, a suit value and a point value corresponding to each user according to the combined card information, and determining a comprehensive weight value corresponding to each user by using the rank value, the suit value and the point value comprises:

inquiring the information of the face type and the face grade value corresponding to the preset game type, and determining the grade value J corresponding to the combined face information of the current user;

determining a suit value H of a current user according to suit data of the current user, wherein when cards held by the current user are of the same suit, a suit weight value corresponding to the suit is obtained from various pre-configured suit weight values, and when cards held by the current user are of non-same suit, a pre-configured suit weight coefficient m is used as the suit value H of the user;

taking the number of the cards with the highest level in the card types of the current user as a point value D of the user;

and calculating and determining a comprehensive weight corresponding to each user by adopting a grade value J, a flower color value H and a point value D, wherein the weight coefficient of the grade value J is greater than that of the flower color value H, and the weight coefficient of the flower color value H is greater than that of the point value D.

10. The card face comparison method of claim 9, wherein the comprehensive weight corresponding to each user is determined by one of the following methods:

when the subsuits are sorted from big to small, and the subsuit weight value corresponding to each subsuit is configured to be sorted from small to big, the comprehensive weight value is J a + (m-H) b + D c, wherein b is the weight coefficient of the flowery value H, b is set to be a value larger than max (D c), c is the weight coefficient of the point value D, a is the weight coefficient of the grade value J, a is set to be a value larger than max ((m-H) b), and m is set to be a value larger than max (H);

when the subsuits are sorted from big to small, and the subsuit weight value corresponding to each subsuit is configured to be sorted from big to small, the integrated weight value is J a + H b + D c, wherein b is the weight coefficient of the subsuit color value H, b is set to be a value larger than max (D c), c is the weight coefficient of the point value D, a is the weight coefficient of the grade value J, and a is set to be a value larger than max ((m-H) b).

Technical Field

The invention relates to the field of communication, in particular to a card face comparison device and a card face comparison method.

Background

Playing card games are popular with many game players because of their interest and skill. Each face of the playing card has different colors and points. In a certain class of poker games, the number of people who can participate in the game at the same time, and the number of cards that each person can take, are different, but basically the same face type, for example: the method is characterized by comprising the steps of matching the playing cards in the same pattern, the same order and the same pair, and different methods also exist for the comparison of the sizes of the playing cards.

With the popularization of electronic platforms, poker games are often presented on the internet, and the poker games are various, such as: in the texas and golden flower games, the card-surface comparison method is similar, but the card game comparison is complex in size and is realized by codes, and the common mode is as follows: the system calculates the cards of each user individually in a cyclic mode according to all card face combination modes.

IVR (Interactive Voice Response) is a Voice value-added service for playing relevant information according to the content input by the user. After the telephone user accesses the IVR service platform, the telephone user can enter the relevant service plate according to the operation prompt.

For the IVR platform, if the card face in each hand of the user is separately calculated in a cyclic manner according to the implementation manner in the related art, and the processing schemes for different card faces are not logically or methodically encapsulated, the universality and the portability are poor. Therefore, how to realize the playing card game of the comparison card surface based on the platform and make the judgment of the game result accurate, universal and efficient, for maintainers, the interface is uniform and is convenient for expansion and maintenance, and a corresponding technical scheme is not available at present.

Disclosure of Invention

The invention mainly aims to disclose a card face comparison device and a card face comparison method, which at least solve the problems that in the related technology, for a poker game for comparing card faces, the judgment of a game result is more accurate, universal and efficient, the universality and the transportability are improved, and a corresponding technical scheme is not available at present.

According to one aspect of the present invention, a card face comparison apparatus is provided.

The card face comparison device according to the present invention comprises: the input interface module is used for acquiring the identification information, the card color information and the card point information of each current user; the storage module is used for storing card face data, suit data, order data, same-point data and suited data corresponding to each user according to the acquired identification information, card face suit information and card face point information; the first judgment module is used for judging according to the card face data, the suit data, the rank data, the same point data and the suited data and determining the basic card face information corresponding to each user; the second judgment module is used for combining and judging according to the basic brand information and determining the combined brand information corresponding to each user; the weight determination module is used for determining a card grade value, a suit value and a point value corresponding to each user according to the combined card information, and calculating and determining a comprehensive weight corresponding to each user by adopting the grade value, the suit value and the point value; and the comparison module is used for comparing the comprehensive weight corresponding to each user to obtain a comparison result.

According to one aspect of the invention, a card face comparison method is provided.

The card face comparison method comprises the following steps: acquiring identification information, card face color information and card face point information of each current user; card face data, suit data, order data, same-point data and suited data corresponding to each user are stored according to the obtained identification information, the card face suit information and the card face point information; judging according to the card face data, the suit data, the order data, the same-point data and the suited data, and determining basic card face information corresponding to each user; combining and judging according to the basic brand information, and determining combined brand information corresponding to each user; determining a card grade value, a suit value and a point value corresponding to each user according to the combined card information, and calculating and determining a comprehensive weight value corresponding to each user by adopting the grade value, the suit value and the point value; and comparing the comprehensive weight values corresponding to the users to obtain comparison results.

By adopting the card face comparison scheme, the basic logic method of the card game is packaged, card face data, flower color data, order data, same-point data and flower card data corresponding to each user are loaded, and logic processing is performed by combining various controllable logic methods, so that the card face comparison of the card game is realized. The judgment of the game result is more accurate, universal and efficient, and the universality and the portability are strong.

Drawings

Fig. 1 is a block diagram showing the structure of a card face comparison device according to an embodiment of the present invention;

fig. 2 is a block diagram showing the construction of a card comparing apparatus according to a preferred embodiment of the present invention;

FIG. 3 is a flowchart for determining basic card information corresponding to a user in accordance with a preferred embodiment of the present invention;

fig. 4 is a flowchart of a card face comparison method according to an embodiment of the present invention.

Detailed Description

The following detailed description of specific embodiments of the present invention is provided in conjunction with the accompanying drawings.

According to the embodiment of the invention, a card face comparison device is provided.

Fig. 1 is a block diagram of a card face comparison device according to an embodiment of the present invention. As shown in fig. 1, the card face comparison device includes: the input interface module 10 is used for acquiring the identification information, the card color information and the card point information of each current user; the storage module 12 is configured to store card face data, suit data, order data, same-point data, and suited data corresponding to each user according to the obtained identification information, card face suit information, and card face rank information; the first judging module 14 is configured to judge according to the card face data, the suit data, the rank data, the same-rank data, and the suited data, and determine basic card face information corresponding to each user; the second judging module 16 is used for combining and judging according to the basic brand information and determining the combined brand information corresponding to each user; the weight determination module 18 is used for determining the rank value, the suit value and the point value of the card corresponding to each user according to the combined card information, and calculating and determining the comprehensive weight corresponding to each user by adopting the rank value, the suit value and the point value; and the comparison module 20 is configured to compare the comprehensive weights corresponding to the users to obtain a comparison result.

The card face comparison device shown in fig. 1 is adopted to package the basic logic method of the card game, load card face data, suit data, rank data, same-point data and suited data corresponding to each user, and combine various controllable logic methods to perform logic processing, so that the card face comparison of the card game is realized. The judgment of the game result is more accurate, universal and efficient, and the universality and the portability are strong.

Preferably, the card surface comparison device may be disposed in the IVR platform, and when a user of the IVR platform participates in the card game through a telephone, the card surface comparison device may be used to implement card surface comparison of the card game. Of course, the card face comparison device can also be arranged in other platforms.

Preferably, as shown in fig. 2, the apparatus may further include: the configuration module 22 is connected to the input interface module 10 and configured to respond to the operation of the user, configure the game type, the card type and the card level value corresponding to the game type, the various suit weights, and the numerical value corresponding to the card points.

For example, taking a five-card poker game as an example, the base card faces for which the five cards are configured are shown in table 1:

type of game Type of face
Game A Same flower
Game A Shunzi (a Chinese character of 'shunzi')
Game A Four strips
Game A Three strips
Game A Two pairs of
Game A A pair of
Game A Royal card

TABLE 1

The above basic card face types can be configured and combined to obtain card faces as shown in table 2:

Figure BDA0002252909930000051

TABLE 2

Configuring each flower color weight value as table 3:

design and color Design and color weight
Black peach 0
Red peach 1
Plum blossom 2
Square block 3

TABLE 3

The configuration card points are as shown in table 4:

number of cards A 2 3 4 5 6 7 8 9 10 J Q K
Numerical value 14 02 03 04 05 06 07 08 09 10 11 12 13

TABLE 4

The configuration module 22 provides a data base for the analysis and logic determination functions in the system.

Preferably, as shown in fig. 2, the first determining module 14 includes: a cosmos judging unit 140, configured to judge whether a maximum value of the number of cards in the same suit in the suit data of the current user is greater than or equal to the total number of cards held by the user, and if yes, judge that the cards are in the same suit; the same-point judging unit 142 is configured to judge the number of pairs, and/or the number of three pairs, and/or the number of four pairs held by the user according to the number of the same-point cards in the same-point data of the current user, and judge whether the cards held by the current user are cards with different points according to the number of pairs, the number of three pairs, and the number of four pairs held by the user; a rank judging unit 144, configured to judge whether a difference between the total number of cards held by the current user and the maximum rank difference in rank data is equal to 1, if yes, judge whether a card held by the current user is a card with a different rank, and if yes, judge that the card is a rank; a card-deck judging unit 146, configured to judge whether the number of cards in the card-deck data of the current user is equal to the total number of cards held by the user, and if so, judge that the card is a royal card, where the number of cards is greater than or equal to a predetermined number.

Preferably, as shown in fig. 2, the weight determining module 18 may further include: the card level determining unit 180 is configured to query information of a card type and a card level value corresponding to a pre-configured game type, and determine a level value J corresponding to combined card information of a current user; a suit value determining unit 182, configured to determine a suit value H of a current user according to suit data of the current user, where when cards held by the current user are in the same suit, a suit weight corresponding to the suit is obtained from various pre-configured suit weights, and when cards held by the current user are not in the same suit, a pre-configured suit weight coefficient m is used as the suit value H of the user; the point value determining unit 184 is configured to use the highest-level card point in the card types of the current user as the point value D of the user; and the weight calculating unit 186 is configured to calculate and determine a comprehensive weight corresponding to each user by using a rank value J, a color value H, and a point value D, where a weight coefficient of the rank value J is greater than a weight coefficient of the color value H, and a weight coefficient of the color value H is greater than a weight coefficient of the point value D.

In a preferred implementation process, the weight calculating unit 186 determines the comprehensive weight corresponding to each user by one of the following methods:

the first method is as follows: when the subsuits are sorted from big to small, and the subsuit weight value corresponding to each subsuit is configured to be sorted from small to big, the comprehensive weight value is J a + (m-H) b + D c, wherein b is the weight coefficient of the flowery value H, b is set to be a value larger than max (D c), c is the weight coefficient of the point value D, a is the weight coefficient of the grade value J, a is set to be a value larger than max ((m-H) b), and m is set to be a value larger than max (H);

the second method comprises the following steps: when the subsuits are sorted from big to small, and the subsuit weight value corresponding to each subsuit is configured to be sorted from big to small, the integrated weight value is J a + H b + D c, wherein b is the weight coefficient of the subsuit color value H, b is set to be a value larger than max (D c), c is the weight coefficient of the point value D, a is the weight coefficient of the grade value J, and a is set to be a value larger than max ((m-H) b).

The above preferred embodiment will be further described below, taking the five card poker game as an example.

Input interface module 10: for each user who participates in the game at present, respectively acquiring identification information, card pattern and color information and card point information of the user;

for example, the input interface module 10 obtains the faces of the users, for example, in the current round of game, the faces of two users are obtained, the number of the faces of each user and the hands of the users in the current game is 5, and preferably, for a specification of the external interface, the input interface module may further convert the following values through the interface, as shown in the following table 5:

Figure BDA0002252909930000091

TABLE 5

As shown in table 5, the converted values may be arrays or strings, for example, every three bits are a face information, the first bit from the left is a face value, the last two bits are dot values, and less than 2 bits complement 0. The converted value can be split into a brand value and a point value according to the requirement in the application of the system, and can be converted into a value type according to the requirement.

Preferably, the storage module 12 may be provided with a plurality of basic memories, including:

a card face memory: storing a certain set of card face data, comprising: user identification, flower color, points, whether the maximum points exist (a plurality of maximum points exist);

the memory of the same flower: storing a set of suit data, comprising: user identification, flower color, the number of the flower color (neglecting points), and the maximum points;

a sequence memory: storing a set of order data, comprising: user identification, the difference between the maximum point and the minimum point of the card surface, and the number of the cards;

a same-point memory: storing a certain set of co-ordinate data, comprising: user identification, points, number of points (ignoring suit);

a card memory: storing a set of deck data, comprising: the number of user logos and faceplates (preset to be greater than or equal to 10 points).

As shown in the following table, a set of face data that needs to be judged for the face type is loaded into the above memories respectively, and the loading results are as follows:

a card face memory:

Figure BDA0002252909930000101

TABLE 6

The memory of the same flower:

user' s Design and color weight Number of Maximum number of points
User A
0 2 9
User A 1 1 10
User A 2 1 7
User A 3 1 8
User B 0 2 11
User B 1 1 5
User B 2 1 11
User B 3 1 5

TABLE 7

A sequence memory:

user' s Difference of point numbers Number of
User A 4 5
User B 6 5

TABLE 8

A same-point memory:

Figure BDA0002252909930000111

Figure BDA0002252909930000121

TABLE 9

A card memory:

user' s Number of cards
User A 1
User B 2

Watch 10

After the storage module stores the card face data, the suit data, the order data, the same-point data and the suited data corresponding to each user, the first judgment module 14 judges according to the card face data, the suit data, the order data, the same-point data and the suited data, and determines the basic card face information corresponding to each user. As described further below in conjunction with fig. 3.

As shown in fig. 3, the paring determination unit 140 in the first determination module determines whether the maximum value of the number of cards with the same suit in the suit data of the current user in the paring memory is greater than or equal to the total number of cards held by the user, because in this example, the total number of cards held by the user is 5, and therefore, determines whether the maximum value of the number of cards with the same suit is greater than or equal to 5, if so, determines that the cards are paring, and if not, determines that the cards are not paring.

As shown in fig. 3, the same-point judging unit 142 in the first judging module judges the number of pairs, and/or the number of three, and/or the number of four held by the user according to the number of the same-point cards in the same-point data of the current user; because the total number of cards held by the user is 5 in this example, when there are n4 sets of cards having the same number of cards of rank 4, the number is recorded as n4, and when n4 is greater than 0, the number is recorded as n4 four cards; similarly, when the number of cards with the same number of points is 3 and there are n3 groups, the number is recorded as n3, and when n3 is greater than 0, n3 three cards are recorded; when the number of the same number cards is 2, and n2 groups exist, the number is recorded as n2, and when n2 is greater than 0, n2 pairs are recorded; when n2, n3 and n4 are both 0 at the same time, it is judged as a non-hit card.

As shown in fig. 3, the rank judging unit 144 in the first judging module judges whether a difference between the total number of cards held by the current user and the maximum difference between the maximum number of points in the rank data is equal to 1, if so, judges whether the cards held by the current user are cards with different numbers of points, and if so, judges the cards to be ranks; that is, when the difference between the total number of the cards held by the current user and the maximum point difference in the sequence data is equal to 1, and when the cards held by the current user are cards with different points, the cards are judged to be in sequence, and when the difference between the total number of the cards held by the current user and the maximum point difference in the sequence data is not equal to 1, the cards are judged to be out of sequence.

As shown in fig. 3, the card-for-flower judging unit 146 in the first judging module judges whether the number of cards in the card-for-flower data of the current user is equal to the total number of cards held by the user, and if so, judges that the card is a royal card, wherein the card-for-flower is greater than or equal to a predetermined number. Because the total number of cards held by the user is 5 in this example, if the number of the deck cards is equal to 5, the card is a royal card, and if the number of the deck cards is not equal to 5, the card is judged to be a non-deck card.

In this example, after the card face information of the user is judged by the basic logic of the first judging module, the basic card face output is as follows:

Figure BDA0002252909930000141

TABLE 11

The second judgment module is used for combining and judging according to the basic brand information and outputting the combined brand information as shown in the table 12:

user' s Type of face
User A Shunzi (a Chinese character of 'shunzi')
User B Three plus one pair

TABLE 12

The weight determination module is used for determining the rank value, the suit value and the point value of the card corresponding to each user according to the combined card outlet surfaces (see table 2) of the configuration module, and calculating and determining the comprehensive weight corresponding to each user by adopting the rank value, the suit value and the point value;

specifically, the weight determination module extracts data from the corresponding memory according to the combined brand information, and outputs the following data after being processed by the module in this example:

user' s Type of face Level value Design and color weight Point value
User A Shunzi (a Chinese character of 'shunzi') 4 4 10
User B Three plus one pair 6 4 5

Watch 13

It should be noted that, in the sequence of the user a, the corresponding rank value in table 2 is 4, three plus one pair of the user B, and the corresponding rank value in table 2 is 6, and since three ranks of the user B are higher than one pair, the rank value corresponding to the user B is 5. The cards held by current users a and B are all non-same suit, and a pre-configured suit weight coefficient m is used as the suit weight H of the user, where the suit weight coefficient m is set to 4, so the suit weight in table 13 is 4.

The weight calculation unit determines the comprehensive weight corresponding to each user through one of the following modes:

the first method is as follows: when the flower colors are sorted from large to small and the flower color weight value corresponding to each flower color is configured to be sorted from small to large, all of a, b, c and m are natural numbers.

The comprehensive weight value is J + a + (flower color weight coefficient m-flower color) b + point value D + c;

wherein: b > max (D × c);

a>max((m-H)*b);

m>max(H);

the second method comprises the following steps: when the flower colors are sorted from big to small, and the flower color weight value corresponding to each flower color is configured to be sorted from big to small, a, b, c and m are all natural numbers.

The integrated weight value is rank a + suit color b + point value c

Wherein: b > max (point value · c);

max (flower color b)

m > max (design and color weight)

In this example, the black peach with the largest flower color has a rank of 0, the square with the smallest flower color has a rank of 3, that is, the first arrangement mode is adopted, so the formula in the first mode is adopted: the integrated weight value J + a + (suit weight coefficient m-suit) b + point value D + c, for example, when set as follows, a is 1000, b is 100, c is 1, and m is 4

Integrated weight value 1000+ (4-suit weight value) 100+ point value

In this example, the two user brand calculation results are as follows:

the comprehensive weight of the user A is as follows: 4010

The comprehensive weight of the user B is as follows: 6005

And the comparison module compares the comprehensive weight of the user A with the comprehensive weight of the user B to obtain a comparison result that the comprehensive weight of the user A is smaller than the comprehensive weight of the user B, and the user B wins the comparison result.

According to the embodiment of the invention, the invention further provides a card face comparison method.

Fig. 4 is a flowchart of a card face comparison method according to an embodiment of the present invention. As shown in fig. 4, the card face comparison method includes:

step S401: acquiring identification information, card face color information and card face point information of each current user;

step S403: card face data, suit data, order data, same-point data and suited data corresponding to each user are stored according to the obtained identification information, the card face suit information and the card face point information;

step S405: judging according to the card face data, the suit data, the order data, the same-point data and the suited data, and determining basic card face information corresponding to each user;

step S407: combining and judging according to the basic brand information, and determining combined brand information corresponding to each user;

step S409: determining a card grade value, a suit value and a point value corresponding to each user according to the combined card information, and calculating and determining a comprehensive weight value corresponding to each user by adopting the grade value, the suit value and the point value;

step S411: and comparing the comprehensive weight values corresponding to the users to obtain comparison results.

The card face comparison method shown in fig. 4 is adopted to package the basic logic method of the card game, load the card face data, the suit data, the rank data, the same-point data and the suited data corresponding to each user, and combine various controllable logic methods to perform logic processing, so that the card face comparison of the card game is realized. The judgment of the game result is more accurate, universal and efficient, and the universality and the portability are strong.

Preferably, before the step S401 is executed to acquire the identification information, card suit information, and card rank information of each current user, the method may further include: responding to the operation of a user, and configuring a game type, a card type and a card level value corresponding to the game type, various suit weights and numerical values corresponding to the card points.

Preferably, the step S405 may further include: judging whether the maximum value of the number of cards with the same suit in the suit data of the current user is larger than or equal to the total number of cards held by the user, if so, judging that the cards are of the same suit; judging the number of pairs, and/or the number of three pieces, and/or the number of four pieces held by the user according to the number of the same-point cards in the same-point data of the current user, and judging whether the cards are cards with different points according to the number of pairs, the number of three pieces, and the number of four pieces held by the user; judging whether the difference value between the total number of the cards held by the current user and the maximum point difference value in the rank data is equal to 1, if so, judging whether the cards held by the current user are cards with different points, and if so, judging the cards to be ranks; judging whether the number of the cards in the card data of the current user is equal to the total number of the cards held by the user, if so, judging the cards to be royal cards, wherein the cards are the cards with the number larger than or equal to a preset number.

Preferably, the step S409 may further include: inquiring the information of the face type and the face grade value corresponding to the preset game type, and determining the grade value J corresponding to the combined face information of the current user; determining a suit value H of a current user according to suit data of the current user, wherein when cards held by the current user are of the same suit, a suit weight value corresponding to the suit is obtained from various pre-configured suit weight values, and when cards held by the current user are of non-same suit, a pre-configured suit weight coefficient m is used as the suit value H of the user; taking the number of the cards with the highest level in the card types of the current user as a point value D of the user; and calculating and determining a comprehensive weight corresponding to each user by adopting a grade value J, a flower color value H and a point value D, wherein the weight coefficient of the grade value J is greater than that of the flower color value H, and the weight coefficient of the flower color value H is greater than that of the point value D.

In a preferred implementation process, the comprehensive weight corresponding to each user may be determined in one of the following manners:

the first method is as follows: when the subsuits are sorted from big to small, and the subsuit weight value corresponding to each subsuit is configured to be sorted from small to big, the comprehensive weight value is J a + (m-H) b + D c, wherein b is the weight coefficient of the flowery value H, b is set to be a value larger than max (D c), c is the weight coefficient of the point value D, a is the weight coefficient of the grade value J, a is set to be a value larger than max ((m-H) b), and m is set to be a value larger than max (H);

the second method comprises the following steps: when the subsuits are sorted from big to small, and the subsuit weight value corresponding to each subsuit is configured to be sorted from big to small, the integrated weight value is J a + H b + D c, wherein b is the weight coefficient of the subsuit color value H, b is set to be a value larger than max (D c), c is the weight coefficient of the point value D, a is the weight coefficient of the grade value J, and a is set to be a value larger than max ((m-H) b).

To sum up, with the above embodiments provided by the present invention, various memories may be set in the storage module as basic technical models, card face data, suit data, rank data, parity data, and face data corresponding to each user are loaded into each corresponding memory, after a basic logic method of a card game is encapsulated, a basic logic judgment is performed, basic card face information corresponding to each user is determined, combination and judgment are performed according to the basic card face information, combined card face information corresponding to each user is determined, then a comprehensive weight corresponding to each user is determined by using the obtained rank value, suit value, and point value, and the comprehensive weight corresponding to each user is compared to obtain a comparison result. Therefore, the scheme combines various controllable logic methods to carry out logic processing, and card surface comparison of the card games is realized. When the user of the IVR platform or other platforms participates in the card game through the telephone, the card-to-card comparison of the card game can be realized by adopting the scheme. And by adopting the card-to-face comparison scheme of the embodiment of the invention, the judgment of the game result is accurate, universal and efficient, and for maintainers, the interface is unified, is convenient for expansion and maintenance, and has high universality and transportability.

The above disclosure is only for a few specific embodiments of the present invention, but the present invention is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种转马结构

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类