add more code for 54 (WIP)

This commit is contained in:
Dr. Matthias Ratajczak
2022-08-17 21:09:35 +02:00
parent 3d3170117c
commit 1dbc0052ca
+17 -2
View File
@@ -1,5 +1,4 @@
#![allow(dead_code, unused_imports)]
use std::{
cmp::max,
collections::{HashMap, HashSet},
@@ -73,6 +72,22 @@ enum Value {
Ace,
}
const VALUES: [Value; 13] = [
Value::Two,
Value::Three,
Value::Four,
Value::Five,
Value::Six,
Value::Seven,
Value::Eight,
Value::Nine,
Value::Ten,
Value::Jack,
Value::Queen,
Value::King,
Value::Ace,
];
impl Value {
fn from_char(c: char) -> Self {
match c {
@@ -185,7 +200,7 @@ impl CardTrait for Cards {
}
fn have_consecutive_values(&self) -> bool {
self[0].value + 1
VALUES.
}
}