generated from PlexSheep/rs-base
automatic cargo CI changes
This commit is contained in:
parent
76453dedf6
commit
f8925f18db
|
@ -4,7 +4,7 @@ pub struct Game {
|
||||||
precompute: bool,
|
precompute: bool,
|
||||||
max_steps: usize,
|
max_steps: usize,
|
||||||
step: usize,
|
step: usize,
|
||||||
solution: String
|
solution: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Game {
|
impl Game {
|
||||||
|
@ -24,14 +24,15 @@ impl Game {
|
||||||
/// # Errors
|
/// # Errors
|
||||||
///
|
///
|
||||||
/// This function will return an error if .
|
/// This function will return an error if .
|
||||||
pub(crate) fn build(length: usize, precompute: bool, max_steps: usize) -> anyhow::Result<(Self)> {
|
pub(crate) fn build(length: usize, precompute: bool, max_steps: usize) -> anyhow::Result<Self> {
|
||||||
let mut game = Game {
|
let _game = Game {
|
||||||
length, precompute, max_steps,
|
length,
|
||||||
|
precompute,
|
||||||
|
max_steps,
|
||||||
step: 0,
|
step: 0,
|
||||||
solution: String::default() // we actually set this later
|
solution: String::default(), // we actually set this later
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// TODO: load wordlist of possible answers
|
// TODO: load wordlist of possible answers
|
||||||
// TODO: select one as a solution at random
|
// TODO: select one as a solution at random
|
||||||
// NOTE: The possible answers should be determined with a wordlist that has the
|
// NOTE: The possible answers should be determined with a wordlist that has the
|
||||||
|
@ -47,7 +48,7 @@ impl Game {
|
||||||
pub struct GameBuilder {
|
pub struct GameBuilder {
|
||||||
length: usize,
|
length: usize,
|
||||||
precompute: bool,
|
precompute: bool,
|
||||||
max_steps: usize
|
max_steps: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl GameBuilder {
|
impl GameBuilder {
|
||||||
|
@ -75,7 +76,7 @@ impl Default for GameBuilder {
|
||||||
Self {
|
Self {
|
||||||
length: super::DEFAULT_WORD_LENGTH,
|
length: super::DEFAULT_WORD_LENGTH,
|
||||||
precompute: false,
|
precompute: false,
|
||||||
max_steps: super::DEFAULT_MAX_STEPS
|
max_steps: super::DEFAULT_MAX_STEPS,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
Loading…
Reference in New Issue