/// What a villain's preflop actions say about the hands they hold. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pub enum PreflopRole { /// First raise of the hand. Opener, /// Re-raised an open. ThreeBettor, /// Re-raised a 3-bet or more. FourBettorPlus, /// Jammed into an unraised pot. JamOpen, /// Jammed over a raise. JamOverRaise, /// Called one raise (cold caller, or a blind defending). CallsRaise, /// Called a 3-bet or more (also the opener who calls a 3-bet). CallsThreeBet, /// Called the big blind in an unraised pot. Limper, /// Small blind completing in an unraised pot. SmallBlindCompleter, /// Big blind that only checked its option. BigBlindCheck, } impl PreflopRole { /// Raising roles follow the player pfr, the others their vpip. pub fn is_raising(self) -> bool { matches!( self, PreflopRole::Opener | PreflopRole::ThreeBettor | PreflopRole::FourBettorPlus | PreflopRole::JamOpen | PreflopRole::JamOverRaise ) } }