codes.derive.foldem.board.Street Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of foldem Show documentation
Show all versions of foldem Show documentation
A Texas Hold 'em Poker Analysis Framework for Java.
/*
* This file is part of Fold'em, a Java library for Texas Hold 'em Poker.
*
* Fold'em is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Fold'em is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Fold'em. If not, see .
*/
package codes.derive.foldem.board;
/**
* An enum representing a board street in Texas Hold 'em.
*/
public enum Street {
/**
* Before the flop.
*/
PREFLOP(0),
/**
* On the flop, 3 cards.
*/
FLOP(3),
/**
* On the turn, 4 cards.
*/
TURN(4),
/**
* On the river, 5 cards.
*/
RIVER(5);
/* The number of cards available on this street */
private final int cards;
/**
* Constructs a street with the provided number of cards.
*
* @param cards
* The number of cards available on the street.
*/
private Street(int cards) {
this.cards = cards;
}
/**
* Gets the number of cards available on the street.
*
* @return The number of cards available on the street.
*/
public int cardCount() {
return cards;
}
}