modes:*: doc strings
This commit is contained in:
@@ -9,6 +9,8 @@ pub enum Footstool {
|
||||
}
|
||||
|
||||
pub trait Hand {
|
||||
/** Given two instances of a Hand (`self` and `other`), verify if `self`
|
||||
footstools `other`. */
|
||||
fn footstool(&self, other: &Self) -> Footstool;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,12 @@ use crate::card::Card;
|
||||
pub struct Single(Card);
|
||||
|
||||
impl Single {
|
||||
/** Create a new single from a card `c`. Will return None if a Single
|
||||
cannot be constructed from that card.
|
||||
|
||||
The only situation where a card cannot be converted into a Single is if it's
|
||||
a Joker.
|
||||
*/
|
||||
fn new(c: Card) -> Option<Single> {
|
||||
(!c.is_joker()).then_some(Single(c))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user