Enum onejoker::poker::hand_value::HandLevel
source · #[repr(u8)]pub enum HandLevel {
Show 22 variants
None = 0,
FiveOfAKind = 1,
StraightFlush = 2,
Quads = 3,
FullHouse = 4,
Flush = 5,
Straight = 6,
Trips = 7,
TwoPair = 8,
Pair = 9,
NoPair = 10,
FourCard = 11,
ThreeCard = 12,
TwoCard = 13,
OneCard = 14,
UnqualifiedFiveOfAKind = 15,
UnqualifiedQuads = 16,
UnqualifiedFullHouse = 17,
UnqualifiedTrips = 18,
UnqualifiedTwoPair = 19,
UnqualifiedPair = 20,
UnqualifiedNoPair = 21,
}
Expand description
wiki | Class for categories of poker hands
Poker hands are ranked by first grouping them into categories (which here we call “level”), and then comparing the ranks of the cards within that level to break ties. We use the actual numbers here to index into tables for calculating comparator values.
Variants§
None = 0
FiveOfAKind = 1
StraightFlush = 2
Quads = 3
FullHouse = 4
Flush = 5
Straight = 6
Trips = 7
TwoPair = 8
Pair = 9
NoPair = 10
FourCard = 11
ThreeCard = 12
TwoCard = 13
OneCard = 14
UnqualifiedFiveOfAKind = 15
UnqualifiedQuads = 16
UnqualifiedFullHouse = 17
UnqualifiedTrips = 18
UnqualifiedTwoPair = 19
UnqualifiedPair = 20
UnqualifiedNoPair = 21
Implementations§
Trait Implementations§
source§impl Ord for HandLevel
impl Ord for HandLevel
source§impl PartialEq for HandLevel
impl PartialEq for HandLevel
source§impl PartialOrd for HandLevel
impl PartialOrd for HandLevel
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for HandLevel
impl Eq for HandLevel
impl StructuralPartialEq for HandLevel
Auto Trait Implementations§
impl Freeze for HandLevel
impl RefUnwindSafe for HandLevel
impl Send for HandLevel
impl Sync for HandLevel
impl Unpin for HandLevel
impl UnwindSafe for HandLevel
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)