Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f3689761d |
@@ -193,7 +193,7 @@ impl GameState {
|
|||||||
is_auto_completable: false,
|
is_auto_completable: false,
|
||||||
undo_count: 0,
|
undo_count: 0,
|
||||||
recycle_count: 0,
|
recycle_count: 0,
|
||||||
take_from_foundation: false,
|
take_from_foundation: true,
|
||||||
schema_version: GAME_STATE_SCHEMA_VERSION,
|
schema_version: GAME_STATE_SCHEMA_VERSION,
|
||||||
undo_stack: VecDeque::new(),
|
undo_stack: VecDeque::new(),
|
||||||
}
|
}
|
||||||
@@ -1408,9 +1408,9 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn take_from_foundation_disabled_by_default() {
|
fn take_from_foundation_enabled_by_default() {
|
||||||
let g = setup_take_from_foundation_game();
|
let g = setup_take_from_foundation_game();
|
||||||
assert!(!g.take_from_foundation, "take_from_foundation is off by default (non-standard rule)");
|
assert!(g.take_from_foundation, "take_from_foundation is on by default (standard Klondike rule)");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -366,10 +366,9 @@ impl SolitaireGame {
|
|||||||
} else {
|
} else {
|
||||||
DrawMode::DrawOne
|
DrawMode::DrawOne
|
||||||
};
|
};
|
||||||
let mut game = GameState::new_with_mode(seed as u64, dm, GameMode::Classic);
|
SolitaireGame {
|
||||||
// The web client has no settings layer; enable standard Klondike rule unconditionally.
|
game: GameState::new_with_mode(seed as u64, dm, GameMode::Classic),
|
||||||
game.take_from_foundation = true;
|
}
|
||||||
SolitaireGame { game }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Full pile snapshot as a JS object.
|
/// Full pile snapshot as a JS object.
|
||||||
|
|||||||
Reference in New Issue
Block a user