feat(engine,core): add Time Attack mode + unlocks panel
- Core: GameMode::TimeAttack variant (no scoring/undo changes — session marker only) - Engine: TimeAttackPlugin with TimeAttackResource, TimeAttackEndedEvent, T hotkey (gated to level >= 5), auto-deal on win, summary toast - Engine: Stats overlay (S) gains an Unlocks subsection (card backs / backgrounds, sorted/deduped) and a live Time Attack panel while active Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -22,12 +22,16 @@ pub enum DrawMode {
|
||||
/// - `Zen`: scoring suppressed (stays at 0); undo allowed; intended for relaxed play.
|
||||
/// - `Challenge`: standard scoring, **undo disabled** (returns
|
||||
/// `MoveError::RuleViolation`).
|
||||
/// - `TimeAttack`: standard scoring + undo; the engine wraps a 10-minute
|
||||
/// countdown around the session and auto-deals a fresh game on every win
|
||||
/// (see `solitaire_engine::TimeAttackPlugin`).
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
|
||||
pub enum GameMode {
|
||||
#[default]
|
||||
Classic,
|
||||
Zen,
|
||||
Challenge,
|
||||
TimeAttack,
|
||||
}
|
||||
|
||||
/// Snapshot of game state used for undo.
|
||||
|
||||
Reference in New Issue
Block a user