We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d267e2 commit 2b0c909Copy full SHA for 2b0c909
src/core/card.rs
@@ -120,6 +120,11 @@ impl Value {
120
Self::Ace => 41,
121
}
122
123
+
124
+ /// Returns true if the card value is of a face card (Jack, Queen, King)
125
+ pub fn is_face_card(&self) -> bool {
126
+ matches!(self, Self::Jack | Self::Queen | Self::King)
127
+ }
128
129
130
impl TryFrom<i32> for Value {
@@ -298,6 +303,11 @@ impl Card {
298
303
299
304
bit_pattern
300
305
306
307
+ /// Returns true if the card is a face card (Jack, Queen, King)
308
309
+ self.value.is_face_card()
310
301
311
302
312
313
impl From<i32> for Card {
0 commit comments