Add MoveFromFoundationConfig option to KlondikeConfig (#12)

Closes #11

Reviewed-on: #12
Co-authored-by: Rhys Lloyd <krakow20@gmail.com>
Co-committed-by: Rhys Lloyd <krakow20@gmail.com>
This commit was merged in pull request #12.
This commit is contained in:
2026-05-29 18:59:26 +00:00
committed by Quaternions
parent 035875c893
commit c9c341e926
5 changed files with 47 additions and 17 deletions
+2 -1
View File
@@ -9,9 +9,10 @@ fn play_to_win(rng: &mut Rng) -> Option<KlondikeStats> {
let mut stats = KlondikeStats::new();
const CONFIG: KlondikeConfig = KlondikeConfig {
draw_stock: klondike::DrawStockConfig::DrawOne,
move_from_foundation: klondike::MoveFromFoundationConfig::Allowed,
};
// play game a bit
while let Some(instruction) = game.get_auto_move()
while let Some(instruction) = game.get_auto_move(&CONFIG)
&& !game.is_win()
{
// quit before 250 moves