generated from PlexSheep/rs-base
Merge branch 'master' of https://git.cscherr.de/PlexSheep/wordle-analyzer
cargo devel CI / cargo CI (push) Successful in 47s
Details
cargo devel CI / cargo CI (push) Successful in 47s
Details
This commit is contained in:
commit
a3e348ba91
|
@ -83,13 +83,14 @@ pub struct GameBuilder<WL: WordList> {
|
||||||
length: usize,
|
length: usize,
|
||||||
precompute: bool,
|
precompute: bool,
|
||||||
max_steps: usize,
|
max_steps: usize,
|
||||||
wordlist: WL
|
wordlist: WL,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<WL: WordList> GameBuilder<WL> {
|
impl<WL: WordList> GameBuilder<WL> {
|
||||||
/// build a [`Game`] with the stored configuration
|
/// build a [`Game`] with the stored configuration
|
||||||
pub fn build(self) -> anyhow::Result<Game<WL>> {
|
pub fn build(self) -> anyhow::Result<Game<WL>> {
|
||||||
let game: Game<WL> = Game::build(self.length, self.precompute, self.max_steps, WL::default())?;
|
let game: Game<WL> =
|
||||||
|
Game::build(self.length, self.precompute, self.max_steps, WL::default())?;
|
||||||
Ok(game)
|
Ok(game)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +126,7 @@ impl<WL: WordList> Default for GameBuilder<WL> {
|
||||||
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,
|
||||||
wordlist: WL::default()
|
wordlist: WL::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
use rand::{prelude::*, seq::IteratorRandom};
|
use rand::{seq::IteratorRandom};
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::ops::RangeBounds;
|
use std::ops::RangeBounds;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue