pub DrawStockConfig
This commit is contained in:
+2
-14
@@ -11,7 +11,7 @@ mod test;
|
|||||||
struct ReadmeDoctests;
|
struct ReadmeDoctests;
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Default)]
|
#[derive(Clone, Copy, Debug, Default)]
|
||||||
enum DrawStockConfig {
|
pub enum DrawStockConfig {
|
||||||
#[default]
|
#[default]
|
||||||
DrawOne = 1,
|
DrawOne = 1,
|
||||||
DrawThree = 3,
|
DrawThree = 3,
|
||||||
@@ -19,19 +19,7 @@ enum DrawStockConfig {
|
|||||||
|
|
||||||
#[derive(Clone, Debug, Default)]
|
#[derive(Clone, Debug, Default)]
|
||||||
pub struct KlondikeConfig {
|
pub struct KlondikeConfig {
|
||||||
draw_stock: DrawStockConfig,
|
pub draw_stock: DrawStockConfig,
|
||||||
}
|
|
||||||
impl KlondikeConfig {
|
|
||||||
pub const fn draw_one_stock() -> Self {
|
|
||||||
KlondikeConfig {
|
|
||||||
draw_stock: DrawStockConfig::DrawOne,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pub const fn draw_three_stock() -> Self {
|
|
||||||
KlondikeConfig {
|
|
||||||
draw_stock: DrawStockConfig::DrawThree,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default)]
|
#[derive(Clone, Debug, Default)]
|
||||||
|
|||||||
Reference in New Issue
Block a user