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:
+3
-2
@@ -7,14 +7,15 @@ Klondike
|
||||
|
||||
```rust
|
||||
use card_game::Session;
|
||||
use klondike::Klondike;
|
||||
use klondike::{Klondike, KlondikeConfig};
|
||||
|
||||
// create game session
|
||||
let game = Klondike::with_seed(123);
|
||||
let config = KlondikeConfig::default();
|
||||
let mut session = Session::new_default(game);
|
||||
|
||||
// play game a bit
|
||||
while let Some(instruction) = session.state().get_auto_move() {
|
||||
while let Some(instruction) = session.state().get_auto_move(&config) {
|
||||
session.process_instruction(instruction);
|
||||
|
||||
// quit after 200 moves or win
|
||||
|
||||
Reference in New Issue
Block a user