feat(wasm): playable browser game at /play
Add `SolitaireGame` WASM binding to `solitaire_wasm` exposing draw(), move_cards(), undo(), auto_complete_step(), and state() — all backed by the real solitaire_core rules engine. Add /play route to solitaire_server serving a full vanilla-JS interactive Klondike game (game.html / game.css / game.js). Features: drag-and-drop card moves (mouse + touch via PointerEvents), click stock to draw, double-click card to auto-move to foundation, undo, draw-1/3 toggle, new game, auto-complete animation, win overlay, seed display. Rebuild solitaire_wasm.js + solitaire_wasm_bg.wasm. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -205,6 +205,10 @@ fn build_router_inner(state: AppState, rate_limit: bool) -> Router {
|
||||
"/replays/{id}",
|
||||
get(|| async { Html(include_str!("../web/index.html")) }),
|
||||
)
|
||||
.route(
|
||||
"/play",
|
||||
get(|| async { Html(include_str!("../web/game.html")) }),
|
||||
)
|
||||
.nest_service("/web", ServeDir::new("solitaire_server/web"));
|
||||
|
||||
Router::new()
|
||||
|
||||
Reference in New Issue
Block a user