Your Name 3 years ago
commit
e9301067c1

+ 2 - 0
.idea/.gitignore

@@ -0,0 +1,2 @@
+# Default ignored files
+/workspace.xml

+ 6 - 0
.idea/misc.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/pocker.iml" filepath="$PROJECT_DIR$/pocker.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="Git" />
+  </component>
+</project>

+ 12 - 0
Game.iml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>
+

BIN
out/production/pocker/com/company/Card.class


BIN
out/production/pocker/com/company/Combination$LIST.class


BIN
out/production/pocker/com/company/Combination.class


BIN
out/production/pocker/com/company/Dealer$1.class


BIN
out/production/pocker/com/company/Dealer.class


BIN
out/production/pocker/com/company/Deck.class


BIN
out/production/pocker/com/company/Lear$NAME.class


BIN
out/production/pocker/com/company/Lear.class


BIN
out/production/pocker/com/company/Main.class


BIN
out/production/pocker/com/company/Player$CARD_SLOT.class


BIN
out/production/pocker/com/company/Player.class


BIN
out/production/pocker/com/company/RATE_TYPE.class


+ 11 - 0
pocker.iml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 34 - 0
src/com/company/Card.java

@@ -0,0 +1,34 @@
+package com.company;
+
+public class Card {
+    // Номинал карты (2 - 14)
+    private int Denomination;
+    // Масть карты
+    Lear.NAME Lear;
+    // Флаг, отвечающий за выдачу этой карты на руки игроку
+    boolean onHands = false;
+
+    /**
+     * Получить номинал карты
+     * @return int
+     */
+    public int getDenomination() {
+        return Denomination;
+    }
+
+    /**
+     * Установить номинал карты. Диапазон допустимых значений 2-14.
+     * @param denomination номинал карты
+     */
+    public void setDenomination(int denomination) {
+        // Проверим, что переданное значение в метод находится
+        // в нужном диапазоне допустимых значений.
+        if (denomination < 2 || denomination > 14) {
+            // Вернуть ложь, если переданное значение некорректное
+            return;
+        }
+        // Установить значение переданное в метод текущей карте
+        Denomination = denomination;
+        // Вернуть истину, если номинал установлен
+    }
+}

+ 37 - 0
src/com/company/Combination.java

@@ -0,0 +1,37 @@
+package com.company;
+
+import java.net.PortUnreachableException;
+
+public class Combination {
+    public enum LIST {
+        HIGH_CARD,
+        ONE_PAIR,
+        TWO_PAIRS,
+        THREE_OF_A_KIND,
+        STRAIGHT,
+        FLUSH,
+        FULL_HOUSE,
+        FOUR_OF_A_KIND,
+        STRAIGHT_FLUSH,
+        ROYAL_FLUSH,
+    };
+
+    public static int[] Coefficient = new int[]{
+            1,
+            4,
+            12,
+            109,
+            115,
+            346,
+            1726,
+            14672,
+            41079,
+            246475,
+    };
+
+    public LIST CurrentCombination;
+    public int Value;
+
+    public Combination() {
+    }
+}

+ 496 - 0
src/com/company/Dealer.java

@@ -0,0 +1,496 @@
+package com.company;
+
+import java.util.Random;
+
+public class Dealer {
+    private final Player[] players;
+    private final Deck deck = new Deck();
+    private final Card[] table = new Card[5];
+    private int CardOnDesk = 0;
+    private RATE_TYPE currentRateType;
+    Random random = new Random(System.currentTimeMillis());
+
+    public Dealer(int playerCount) throws Exception {
+        if (playerCount < 2 || playerCount > 9) {
+            throw new Exception("Некорректное количество игроков!");
+        }
+
+        players = new Player[playerCount];
+
+        for (int i = 0; i < playerCount; i++) {
+            players[i] = new Player("Player-" + (i + 1));
+        }
+
+        currentRateType = RATE_TYPE.PREFLOP;
+    }
+
+    /**
+     * Раздача карт
+     */
+    public void HandOut() {
+        switch (currentRateType) {
+            case PREFLOP: {
+                for (int i = 0; i < players.length; i++) {
+                    int cardIndex1 = random.nextInt(52);
+                    int cardIndex2 = random.nextInt(52);
+                    Card card1 = deck.Cards[cardIndex1];
+                    Card card2 = deck.Cards[cardIndex2];
+
+                    if (card1.onHands || card2.onHands) {
+                        i--;
+                        continue;
+                    }
+
+                    card1.onHands = true;
+                    card2.onHands = true;
+                    players[i].setCards(Player.CARD_SLOT.FIRST, card1);
+                    players[i].setCards(Player.CARD_SLOT.SECOND, card2);
+                }
+                currentRateType = RATE_TYPE.FLOP;
+            }
+            break;
+            case FLOP: {
+                PutOnDesk(3);
+                currentRateType = RATE_TYPE.TURN;
+            }
+            break;
+            case TURN: {
+                PutOnDesk(1);
+                currentRateType = RATE_TYPE.RIVER;
+            }
+            break;
+            case RIVER: {
+                PutOnDesk(1);
+                currentRateType = RATE_TYPE.OPENING;
+            }
+            break;
+            case OPENING: {
+                OpeningCard();
+                CardOnDesk = 0;
+                currentRateType = RATE_TYPE.PREFLOP;
+            }
+        }
+    }
+
+    /**
+     * Положить на стол cardCount карт
+     *
+     * @param cardCount количество карт для раздачи
+     */
+    public void PutOnDesk(int cardCount) {
+        for (int i = 0; i < cardCount; i++) {
+            int cardIndex = random.nextInt(52);
+            Card currentCard = deck.Cards[cardIndex];
+            if (currentCard.onHands) {
+                i--;
+                continue;
+            }
+            table[CardOnDesk++] = currentCard;
+            currentCard.onHands = true;
+        }
+    }
+
+    // ♦♣♥♠
+    public void OpeningCard() {
+        System.out.println("Карты на столе ");
+        for (Card card : table) {
+            System.out.print(
+                    deck.CardName.get(card.getDenomination())
+                            + Lear.SYMBOL[card.Lear.ordinal()] + " ");
+        }
+        System.out.println("\n\nКарты игроков");
+
+        for (Player player : players) {
+            Card[] sharedCards = new Card[7];
+            int i = 0;
+            for (; i < table.length; i++) {
+                sharedCards[i] = table[i];
+            }
+            sharedCards[i++] = player.getCards(Player.CARD_SLOT.FIRST);
+            sharedCards[i] = player.getCards(Player.CARD_SLOT.SECOND);
+
+            try {
+                Sorting(sharedCards);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+
+            PrintCard(sharedCards);
+
+            if (!isRoyalFlush(sharedCards, player)) {
+                if (!isStraightFlush(sharedCards, player)) {
+                    if (!isFourOfAKind(sharedCards, player)) {
+                        if (!isFullHouse(sharedCards, player)) {
+                            if (!isFlush(sharedCards, player)) {
+                                if (!isStraight(sharedCards, player)) {
+                                    if (!isThreeOfAKind(sharedCards, player)) {
+                                        if (!isTwoPairs(sharedCards, player)) {
+                                            if (!isOnePair(sharedCards, player)) {
+
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            System.out.println(player.getName() + " " + player.combination.Value);
+        }
+
+        for (int k = 0; k < players.length; k++) {
+            for (int l = 1; l < players.length; l++) {
+                if (players[k].combination.Value == players[l].combination.Value) {
+                    for (Card card : sharedCards) {
+
+                    }
+                }
+            }
+        }
+    }
+
+    public void PrintCard(Card[] cards) {
+        for (Card card : cards) {
+            System.out.print(
+                    deck.CardName.get(card.getDenomination())
+                            + Lear.SYMBOL[card.Lear.ordinal()] + " ");
+        }
+        System.out.println();
+    }
+
+    /**
+     * Сортировка массива карт по убыванию его номинала
+     *
+     * @param cards массив карт (7 штук)
+     */
+    public void Sorting(Card[] cards) throws Exception {
+        if (cards.length != 7) {
+            throw new Exception("Что-то пошло не так");
+        }
+
+        for (int i = 0; i < cards.length; i++) {
+            for (int j = 0; j < cards.length - 1; j++) {
+                if (cards[j].getDenomination() < cards[j + 1].getDenomination()) {
+                    Card temp = cards[j];
+                    cards[j] = cards[j + 1];
+                    cards[j + 1] = temp;
+                }
+            }
+        }
+    }
+
+    /**
+     * Проверяет есть ли в переданном массиве комбинация Стрит
+     *
+     * @param cards массив карт
+     */
+    public boolean isRoyalFlush(Card[] cards, Player player) {
+        boolean cardK = false;
+        boolean cardQ = false;
+        boolean cardJ = false;
+        boolean card10 = false;
+        if (cards[0].getDenomination() == 14 && isStraightFlush(cards, player)) {
+            for (int i = 0; i < cards.length - 1; i++) {
+                if (cards[i].getDenomination() == 13) {
+                    cardK = true;
+                }
+                if (cards[i].getDenomination() == 12) {
+                    cardQ = true;
+                }
+                if (cards[i].getDenomination() == 11) {
+                    cardJ = true;
+                }
+                if (cards[i].getDenomination() == 10) {
+                    card10 = true;
+                }
+            }
+            if (card10 && cardJ && cardK && cardQ) {
+                player.combination.CurrentCombination = Combination.LIST.ROYAL_FLUSH;
+                player.combination.Value = 60 * Combination.Coefficient[Combination.LIST.ROYAL_FLUSH.ordinal()];
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Стрит-флеш
+     * @param cards массив карт игрока и на столе отсортированных по номиналу
+     * @param player экземпляр игрока
+     */
+    public boolean isStraightFlush(Card[] cards, Player player) {
+        int counter = 0;
+        player.combination.Value = 0;
+        for (int i = 0; i < cards.length - 1; i++) {
+
+            if (cards[i].getDenomination() == cards[i + 1].getDenomination()) {
+                continue;
+            }
+
+            if (cards[i].getDenomination() != cards[i + 1].getDenomination() + 1) {
+                if (i < 2) {
+                    counter = 0;
+                    player.combination.Value = 0;
+                    continue;
+                }
+                break;
+            }
+            if (cards[i].Lear == cards[i + 1].Lear && cards[i].getDenomination() == cards[i + 1].getDenomination() + 1) {
+                counter++;
+                player.combination.Value += cards[i].getDenomination();
+                if (counter == 4) {
+                    player.combination.CurrentCombination = Combination.LIST.STRAIGHT_FLUSH;
+                    player.combination.Value += cards[i + 1].getDenomination();
+                    player.combination.Value *= Combination.Coefficient[Combination.LIST.STRAIGHT_FLUSH.ordinal()];
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Каре (четыре одного вида)
+     * @param cards массив карт игрока и на столе отсортированных по номиналу
+     * @param player экземпляр игрока
+     */
+    public boolean isFourOfAKind(Card[] cards, Player player) {
+        int count = 0;
+        player.combination.Value = 0;
+        for (int i = 0; i < cards.length - 1; i++) {
+            if (cards[i].getDenomination() == cards[i + 1].getDenomination()) {
+                count++;
+                player.combination.Value += cards[i].getDenomination();
+
+                if (count == 3) {
+                    player.combination.Value += cards[i + 1].getDenomination();
+                    player.combination.Value *= Combination.Coefficient[Combination.LIST.FOUR_OF_A_KIND.ordinal()];
+                    return true;
+                }
+            } else {
+                count = 0;
+                player.combination.Value = 0;
+            }
+        }
+        return false;
+    }
+
+    public boolean isFullHouse(Card[] cards, Player player) {
+        int count1 = 0;
+        int count2 = 0;
+        int value1 = 0;
+        int value2 = 0;
+        player.combination.Value = 0;
+        for (int i = 0; i < cards.length - 1; i++) {
+            if (cards[i].getDenomination() == cards[i + 1].getDenomination()) {
+                count1++;
+                value1 = cards[i].getDenomination();
+            }
+
+            if (cards[i].getDenomination() != cards[i + 1].getDenomination()) {
+                if (count1 == 2 || count1 == 1) {
+                    break;
+                } else {
+                    count1 = 0;
+                    value1 = 0;
+                }
+            }
+        }
+
+        for (int j = 0; j < cards.length - 1; j++) {
+            if (cards[j].getDenomination() == value1) {
+                continue;
+            }
+            if (cards[j].getDenomination() == cards[j + 1].getDenomination()) {
+                count2++;
+                value2 = cards[j].getDenomination();
+            }
+            if (count2 == 2) {
+                break;
+            }
+            if (cards[j].getDenomination() != cards[j + 1].getDenomination()) {
+                if (count2 == 1) {
+                    break;
+                } else count2 = 0;
+            }
+        }
+
+        if (count1 == count2 && count1 > 1) {
+            if (value1 > value2) {
+                player.combination.Value = value1 * 3 + value2 * 2;
+            } else {
+                player.combination.Value = value1 * 2 + value2 * 3;
+            }
+            player.combination.CurrentCombination = Combination.LIST.FULL_HOUSE;
+            player.combination.Value *= Combination.Coefficient[Combination.LIST.FULL_HOUSE.ordinal()];
+
+            return true;
+        } else {
+            if (count1 == 1 && count2 == 2 || count1 == 2 && count2 == 1) {
+                player.combination.Value = value1 * count1 + value2 * count2 * Combination.Coefficient[Combination.LIST.FULL_HOUSE.ordinal()];
+                player.combination.CurrentCombination = Combination.LIST.FULL_HOUSE;
+
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     *
+     * !!! ДОРАБОТАТЬ !!!
+     *
+     */
+    public boolean isFlush(Card[] cards, Player player) {
+        int CountHearts = 0;
+        int CountDiamonds = 0;
+        int CountClubs = 0;
+        int CountSpades = 0;
+
+        for (int i = 0; i < cards.length - 1; i++) {
+            if (cards[i].Lear == Lear.NAME.CLUBS) {
+                CountClubs++;
+            }
+            if (cards[i].Lear == Lear.NAME.DIAMONDS) {
+                CountDiamonds++;
+            }
+            if (cards[i].Lear == Lear.NAME.SPADES) {
+                CountSpades++;
+            }
+            if (cards[i].Lear == Lear.NAME.HEARTS) {
+                CountHearts++;
+            }
+        }
+        if (CountClubs >= 5 || CountDiamonds >= 5 || CountSpades >= 5 || CountHearts >= 5) {
+            return true;
+        } else return false;
+    }
+
+    public boolean isStraight(Card[] cards, Player player) {
+        int counter = 0;
+        player.combination.Value = 0;
+
+        if (cards[0].getDenomination() == 14 && cards[6].getDenomination() == 2) {
+            boolean CardIsFive = false;
+            boolean CardIsFour = false;
+            boolean CardIsThree = false;
+
+            for (int i = 0; i < cards.length - 1; i++) {
+                if (cards[i].getDenomination() == 3) {
+                    CardIsThree = true;
+                }
+                if (cards[i].getDenomination() == 4) {
+                    CardIsFour = true;
+                }
+                if (cards[i].getDenomination() == 5) {
+                    CardIsFive = true;
+                }
+            }
+            if (CardIsFive && CardIsFour && CardIsThree) {
+                player.combination.CurrentCombination = Combination.LIST.STRAIGHT;
+                player.combination.Value = 60 * Combination.LIST.STRAIGHT.ordinal();
+
+                return true;
+            }
+        }
+
+        for (int i = 0; i < cards.length - 1; i++) {
+
+            if (cards[i].getDenomination() == cards[i + 1].getDenomination()) {
+                continue;
+            }
+
+            if (cards[i].getDenomination() != cards[i + 1].getDenomination() + 1) {
+                if (i < 2) {
+                    counter = 0;
+                    player.combination.Value = 0;
+                    continue;
+                }
+                break;
+            }
+
+            counter++;
+            player.combination.Value += cards[i].getDenomination();
+
+            if (counter == 4) {
+                player.combination.Value += cards[i + 1].getDenomination();
+                player.combination.Value *= Combination.Coefficient[Combination.LIST.STRAIGHT.ordinal()];
+                player.combination.CurrentCombination = Combination.LIST.STRAIGHT;
+                return true;
+            }
+        }
+
+        return false;
+
+    }
+
+    public boolean isThreeOfAKind(Card[] cards, Player player) {
+        int count = 0;
+        player.combination.Value = 0;
+        for (int i = 0; i < cards.length - 1; i++) {
+            if (cards[i].getDenomination() == cards[i + 1].getDenomination()) {
+                count++;
+                player.combination.Value += cards[i].getDenomination();
+            } else {
+                count = 0;
+                player.combination.Value = 0;
+            }
+            if (count == 2) {
+                player.combination.Value += cards[i + 1].getDenomination();
+                player.combination.Value *= Combination.Coefficient[Combination.LIST.THREE_OF_A_KIND.ordinal()];
+                player.combination.CurrentCombination = Combination.LIST.THREE_OF_A_KIND;
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public boolean isTwoPairs(Card[] cards, Player player) {
+        int count1 = 0, value1 = 0;
+        int count2 = 0, value2 = 0;
+        player.combination.Value = 0;
+        for (int i = 0; i < cards.length - 1; i++) {
+            if (cards[i].getDenomination() == cards[i + 1].getDenomination()) {
+                count1++;
+                if (count1 == 1) {
+                    value1 = cards[i].getDenomination();
+                    break;
+                }
+            }
+        }
+        for (int j = 0; j < cards.length - 1; j++) {
+            if (cards[j].getDenomination() == value1) {
+                continue;
+            }
+            if (cards[j].getDenomination() == cards[j + 1].getDenomination()) {
+                count2++;
+                if (count2 == 1) {
+                    value2 = cards[j].getDenomination();
+                    break;
+                }
+            }
+        }
+        if (count1 == 1 && count2 == 1) {
+            player.combination.Value = (value1 * 2 + value2 * 2) * Combination.Coefficient[Combination.LIST.TWO_PAIRS.ordinal()];
+            player.combination.CurrentCombination = Combination.LIST.TWO_PAIRS;
+            return true;
+        }
+        return false;
+    }
+
+    public boolean isOnePair(Card[] cards, Player player) {
+        player.combination.Value = 0;
+        for (int i = 0; i < cards.length - 1; i++) {
+            if (cards[i].getDenomination() == cards[i + 1].getDenomination()) {
+                player.combination.Value = cards[i].getDenomination() * 2 * Combination.Coefficient[Combination.LIST.ONE_PAIR.ordinal()];
+                player.combination.CurrentCombination = Combination.LIST.ONE_PAIR;
+                return true;
+            }
+        }
+        return false;
+    }
+}
+

+ 61 - 0
src/com/company/Deck.java

@@ -0,0 +1,61 @@
+package com.company;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
+
+/**
+ * Класс реализующий колоду
+ */
+public class Deck {
+    public final int CARD_COUNT = 52;
+
+    public Card Cards[] = new Card[CARD_COUNT];
+
+    Map<Integer, String> CardName = new HashMap<>();
+
+    /**
+     * Конструктор создает колоду карт
+     */
+    public Deck() {
+        for (int i = 0; i < CARD_COUNT; i++) {
+            Cards[i] = new Card();
+        }
+        Build();
+
+        CardName.put(2, "2");
+        CardName.put(3, "3");
+        CardName.put(4, "4");
+        CardName.put(5, "5");
+        CardName.put(6, "6");
+        CardName.put(7, "7");
+        CardName.put(8, "8");
+        CardName.put(9, "9");
+        CardName.put(10, "10");
+        CardName.put(11, "J");
+        CardName.put(12, "Q");
+        CardName.put(13, "K");
+        CardName.put(14, "A");
+    }
+
+    /**
+     * Метод генерирует колоду
+     */
+    public void Build() {
+        // Количество различных номиналов (для цикла от 2 до 14 включительно)
+        int denominationCount = (CARD_COUNT / 4) + 2;
+        // Счетчик всех карт (для прохода по массиву cards)
+        int cardCounter = 0;
+        // Цикл foreach (пройти по каджой масти)
+        for (Lear.NAME lear: Lear.NAME.values()) {
+            // Цикл по номиналам (от 2 до 14 включительно)
+            for (int j = 2; j < denominationCount; j++) {
+                // Записать текущую масть в карту с индексом cardCounter
+                Cards[cardCounter].Lear = lear;
+                // Записать текущий номинал в карту с индексом cardCounter
+                // и увеличить счетчик
+                Cards[cardCounter++].setDenomination(j);
+            }
+        }
+    }
+}

+ 18 - 0
src/com/company/Lear.java

@@ -0,0 +1,18 @@
+package com.company;
+
+
+
+public class Lear {
+    /**
+     * Перечисление мастей карт
+     */
+    public enum NAME {
+        DIAMONDS,   // буби
+        HEARTS,     // черви
+        SPADES,     // пики
+        CLUBS,      // крести
+    }
+
+    public final static char []SYMBOL = new char[] {'♦','♥','♠','♣'};
+
+}

+ 15 - 0
src/com/company/Main.java

@@ -0,0 +1,15 @@
+package com.company;
+
+public class Main {
+
+    public static void main(String[] args) throws Exception {
+
+        Dealer dealer = new Dealer(4);
+        dealer.HandOut();
+        dealer.HandOut();
+        dealer.HandOut();
+        dealer.HandOut();
+        dealer.HandOut();
+
+    }
+}

+ 44 - 0
src/com/company/Player.java

@@ -0,0 +1,44 @@
+package com.company;
+
+
+
+/**
+ * Игрок
+ */
+public class Player {
+    private final Card[] cards = new Card[7];
+    private String name;
+    public Combination combination;
+
+    public Player(String name) {
+        this.name = name;
+        this.combination = new Combination();
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Установить карту в указанный слот
+     * @param slot
+     * @param card
+     */
+    public void setCards(CARD_SLOT slot, Card card) {
+        cards[slot.ordinal()] = card;
+    }
+
+    public Card getCards(CARD_SLOT slot) {
+        return cards[slot.ordinal()];
+    }
+
+    /**
+     * Перечисление карт игрока.
+     * FIRST - первая карта (или 0)
+     * SECOND - вторая карта (или 1)
+     */
+    public enum CARD_SLOT {
+        FIRST,
+        SECOND,
+    }
+}

+ 12 - 0
src/com/company/RATE_TYPE.java

@@ -0,0 +1,12 @@
+package com.company;
+
+/**
+ * Типы ставок
+ */
+public enum RATE_TYPE {
+    PREFLOP,
+    FLOP,
+    TURN,
+    RIVER,
+    OPENING,
+};