Analysing Cards Structure |
Top Previous Next |
In X-Feeder the value of a card can be expressed with one of the following items: 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, A
Suits are designated in the following way:
Example: AS, 10C, 8S, 2D.
You can order a trigger to take some action based on the cards that are currently dealt to players and/or to other entities of the game (such as community cards in Poker and Omaha).
There are many ways in which you may want to analyse the cards. X-Feeder offers the following techniques.
Analysing the highest and lowest cards of a selection
In Poker and Omaha players (or hands) are dealt only two cards. So checking the value of the highest and lowest cards of a selection is quite a frequent task for triggers that operate in those channels.
You can address the highest and lowest cards of a selection directly, using a corresponding condition:
Using different comparative expressions you can check whether the card is within some range of values or whether it has an exact value. The drop-down list of options that appear as soon as you choose "Highest Card" or "Lowest Card" shows you the possible card values.
Examples:
Selection's Lowest Card is less than 6 Selection's Highest Card is between 10 and K Selection's Highest Card is outside 5 and J
However, you are not limited to these options. You can also check the suit of the card. Example:
Any Selection's Highest Card is equal to S
That will find the selections whose highest card is a spade.
Any Selection's Highest Card is equal to AS
This means: find a selection that holds an ace of spades.
Selection's Lowest Card is between 2H and 10H
This means: check if the selection's lowest card is 2, 3, 4, 5, 6, 7, 8, 9 or 10 of hearts.
Instead of the actual card values you can use any trigger variable that returns a card value. For example:
Selection's Lowest Card is equal or less than {hi_card - 2}
Check if the lowest card is at least two points less than the highest card of the same selection. For example, 10 and 8, Q and 10, 4 and 2 and so on.
Note that card arithmetic can be used.
Analysing cards by their rank
Card-related trigger variables give you the access to every card among those that are dealt to a player. They also allow you to access each of the HiLo cards and Poker community cards. So you can check the value and suit of the first, second, third etc. cards. The mechanism is the same as with highest and lowest cards, since it verifies the value and suit of a single card at a time. The only difference is the structure of the condition itself. In order to check the value of a variable you need to include it into a "Trigger Expression", and then make the latter the body of a condition.
This means: check if the highest poker card is lower than king.
If a card variable is related to selections, then the trigger expression will be evaluated for each selection successively. Once the condition is met for one or more selections, that selection will be eligible for the trigger (it will become a "matching" selection).
Finding incomplete straights or flushes
In Poker or Omaha channels, starting from the third round a hand may hold an incomplete straight or flush combination. Examples of such combinations are below:
Incomplete straight: 9, 10, -, Q, K.
Incomplete flush: 3, 5, 10, K of diamonds (1 card missing).
To spot such game situations, use the following triger conditions:
(Any) Selection's Cards contain values incomplete straight
(Any) Selection's Cards contain values incomplete flush
These options are in the end of the drop-down list.
Analysing two and more cards
You also have an opportunity to find out if there are certain values and suits among several cards, without the need to check each card separately. It is possible to analyse selections' cards, HiLo cards that have been dealt and Poker community cards. X-Feeder offers the corresponding tools for creating conditions:
Select "Cards" to work with a selection's cards.
Select "HiLo" cards if you want to analyse the values of the dealt cards in HiLo:
Finally, select "Poker Community Cards" to assess the cards on the flop in Poker and Omaha:
You can use all comparative expressions in such conditions, but all of them, except "contain values" and "do not contain values" will treat the cards as the "number of cards" and thus will verify how many cards are dealt, not the structure of the cards.
So we'll pay a closer attention to the options "contain values" and "do not contain values". Please first read this chapter before you continue reading further.
The simplest example of a condition that looks for a particular card value is below:
Selection's Cards contain values 2
This means: check if there is a two among the selection's cards. The program will evaluate each card that is dealt to the selection, and if at least one of them is a 2 of any suit, the condition will be met.
To find out if the cards contain 2 or - say - 3, you'll need to add two conditions and connect them with an "OR":
Selection's Cards contain values 2 or Selection's Cards contain values 3
However, if you want to check whether BOTH 2 and 3 are among the selection's cards, you can simply put them in the same field:
Selection's Cards contain values 2, 3
In the same way you can add the third, fourth etc. values:
HiLo Cards contain values A, 2, 3, 4
A somewhat more complicated thing is to check whether the cards contain a range of values, for example:
Poker Community Cards contain values 4>, J<
This means: check whether there is one card that is higher than 4, and another card lower than J among the cards on the flop. That is, this set of cards would not qualify:
3, J, A
Another way of expressing the range of values is as follows:
Selection's Cards contain values J-A, 2-4
This means: checks whether the selection holds a picture card and one with the value from 2 to 4.
Playing with trigger variables makes this technique more versatile.
Selection's Cards contain values h_1_card_1
Check whether the selections holds the same card as the favourite's highest card. So if the favourite's cards are 10, 9, then the possible combination of cards could be Q,10 or 10,2 or 10,10.
A classic example in Poker is finding a situation when there is one hand holding the same highest and a higher lowest card, than the given selection, and another hand that holds the same lowest and a higher highest card. For example:
Hand 1: A, 3 Hand 2: 3, 7 Hand 3: 7, 10
Usually you would lay on Hand 2. To find such selection is quite simple.
Any Selection's Back Price is less than 20.0 and Any Other Selection's Cards contain values card_1>, card_2 and Any Other Selection's Cards contain values card_1, card_2>
The first condition picks out the hands that will be compared to all other hands. The second condition takes the hand that passed through the first condition and analyses all "other" selections' cards. It looks for a card that is higher than the original hand's highest card, and the same card as the lowest card of the original hand. The variables card_1 and card_2 return the highest and lowest card of the selection that passed the first condition. The third condition is similar to the second one. It also tries to find a certain combination of cards among all "other" selections. But the difference is the following: there must be the same card as the highest card of the original hand, and a card of a higher value than its lowest card.
It may be difficult to comprehend. A couple of screenshots might help.
This is a step-by-step description of how the program will process the conditions.
1. Find all selections whose price is below 20.0. All four hands qualify.
2.1. Take the first hand and find all other selections. These will be "Hand 2", "Hand 3" and "Hand 4" 2.2. Evaluate the trigger variables. card_1 = 7, card_2 = 4. 2.3. Does any of the three hands hold the cards, one of which is higher than 7 and another one is equal to 4? Evaluating each hand separately. None of them qualify. Therefore, "Hand 1" does not match the second condition.
3.1. Take the second hand and find all other selections for it. Those will be "Hand 1", "Hand 3" and "Hand 4". 3.2. Evaluate the trigger variables. card_1 = K, card_2 = 5. 3.3. Does any of the three hands hold the cards, one of which is higher than K and another one is equal to 5? Evaluating each hand separately. "Hand 4" has a 5 among its cards, but 9 is not higher than K. So none of them qualify. "Hand 2" does not match the second condition either.
4.1. Take the third hand and find all other selections for it. Those will be "Hand 1", "Hand 2" and "Hand 4". 4.2. Evaluate the trigger variables. card_1 = J, card_2 = 9. 4.3. Does any of the three hands hold the cards, one of which is higher than J and another one is equal to 9? Evaluating each hand separately. "Hand 4" has a 9 among its cards, but 9 is not higher than J. Other hands don't have appropriate cards either. "Hand 3" does not match the second condition.
5.1. Take the fourth hand and find all other selections. These will be "Hand 1", "Hand 2" and "Hand 3" 5.2. Evaluate the trigger variables. card_1 = 9, card_2 = 5. 5.3. Does any of the three hands hold the cards, one of which is higher than 9 and another one is equal to 5? Evaluating each hand separately. There is only one hand out of three that holds a 5. It is "Hand 2". Is its second card higher than 9? Yes, K is higher than 9. So At least one "other" card qualifies. This means that "Hand 4" is the only one that meets the second condition. It will be passed over to the next condition.
6.1. Take the selections that matched the previous conditions. The only such selection is "Hand 4". Find all "other" selections for this one. They will be "Hand 1", "Hand 2", "Hand 3". 6.2. Evaluate the trigger variables. card_1 = 9, card_2 = 5. 6.3. Does any of the three selections have two cards, one of which is equal to 9, and another one is higher than 5? "Hand 1" does not hold a 9, neither does "Hand 2". But "Hand 3" has a 9, and besides its second card is J, which is higher than 5. So at least one other selection met the criteria, so "Hand 1" matched the third condition.
No more other conditions left, so the trigger will be executed, and in our case it will lay on the single "matching" selection. Hurrah!
Finding out if cards dealt in the game are different
If you want to know whether the cards of a particular selection do not have the same values as any of the cards of another selection, you can apply the following trigger condition:
Selection's Cards do not contain values same card as others
To find out the opposite (i.e. whether the selection has at least one card with the same value as any other selection) just remove "do not" from the condition:
Selection's Cards contain values same card as others
If you want to find the selection(s) whose cards are not repeated by others, start the same condition with "Any Selection's"
Any Selection's Cards do not contain values same card as others
If you want to make sure that all selections have different cards, use the words "Every Selection's":
Every Selection's Cards do not contain values same card as others
Note: if a selection is not associated with a game player that has cards (for example, "Tie" in Baccarat) it will be ignored, its cards (which it actually does not have) will not be checked.
It is one of the ways to find out if the objects in the game have different cards. The above conditions will not check the cards dealt to the flop in Poker and Omaha. If it is important that those cards are taken into account too, then you should operate special trigger variables, starting with "unicds_". This prefix allows you to access the unique values of the cards dealt to various game objects. It also allows you to count how many such values exist in the current round of the game. So, for instance, if you want to know whether all cards are different in round 2 of a Poker game, it is enough to apply the following condition:
Trigger Expression unicds_count is equal to 8
As there are four selections in Poker, and no community cards are dealt in round 2, this will mean that all selections have different cards (8 unique card values).
In round 3 the condition should be different, as three more cards are dealt in the game:
Trigger Expression unicds_count is equal to 11
In Omaha this number would be different as in round 3 there are four cards dealt to each selection, and three cards dealt to the flop, 15 in total:
Trigger Expression unicds_count is equal to 15
|