From 0d9480d11385947f9a53ecdbee21601bd31a514c Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 16 Apr 2026 21:10:47 +0100 Subject: [PATCH] modes:mod: docs for Hand trait --- src/modes/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modes/mod.rs b/src/modes/mod.rs index aef7ff9..dd779fb 100644 --- a/src/modes/mod.rs +++ b/src/modes/mod.rs @@ -12,16 +12,18 @@ pub enum Footstool { } pub trait Hand: Ord { - // Only need to implement is_proper. + /// Return true if the current hand doesn't have any jokers. fn is_proper(&self) -> bool; + /// Return true if the current hand has at least one Joker. fn is_improper(&self) -> bool { !self.is_proper() } + /// Get the high card of the current hand. fn high_card(&self) -> Card; - /// Given two instances of a Hand (`self` and `other`), verify if `self` + /// Given two instances of a Hand (`self` and `other`), return if `self` /// footstools `other`. fn footstool(&self, other: &Self) -> Footstool; }