diff --git a/src/modes/single.rs b/src/modes/single.rs index 4448106..fc09c75 100644 --- a/src/modes/single.rs +++ b/src/modes/single.rs @@ -9,6 +9,24 @@ impl Single { } } +use crate::helper::ordered; +use crate::modes::{Footstool, Hand}; + +impl Hand for Single { + fn footstool(&self, other: Self) -> Footstool { + let self_abs = self.0.deck_abs(); + let other_abs = other.0.deck_abs(); + + if self_abs == other_abs { + Footstool::Full + } else if self_abs == other_abs + 1 { + Footstool::Half + } else { + Footstool::None + } + } +} + use std::fmt::{Display, Formatter, Result}; impl Display for Single { fn fmt(&self, f: &mut Formatter<'_>) -> Result {