pub struct Board {
pub flop: Option<Flop>,
pub turn: Option<Card>,
pub river: Option<Card>,
}Expand description
Represents a poker board (flop, turn, river)
A poker board consists of community cards dealt during a game:
- Flop: The first three community cards (optional)
- Turn: The fourth community card (optional, requires flop)
- River: The fifth community card (optional, requires turn)
§Examples
use open_pql::{Board, Card, Rank::*, Suit::*};
let cards = [Card::new(RA, S), Card::new(RK, H), Card::new(RQ, D)];
let board = Board::from_slice(&cards);
assert_eq!(board.len(), 3);
assert!(!board.is_empty());Fields§
§flop: Option<Flop>§turn: Option<Card>§river: Option<Card>Implementations§
Source§impl Board
impl Board
Source§impl Board
impl Board
pub fn new_iso_with_mapping(cards: &[Card], mapping: &mut SuitMapping) -> Self
pub fn new_iso(cards: &[Card]) -> (Self, SuitMapping)
Trait Implementations§
impl Copy for Board
impl Eq for Board
impl StructuralPartialEq for Board
Auto Trait Implementations§
impl Freeze for Board
impl RefUnwindSafe for Board
impl Send for Board
impl Sync for Board
impl Unpin for Board
impl UnwindSafe for Board
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more