Summary
Hard difficulty grid should adapt to device orientation to keep cells readable. In portrait, use a tall grid; in landscape, use a wide grid. Keep mine density consistent with the current Hard baseline.
Details
- Portrait: 14 (cols) x 24 (rows)
- Landscape: 24 (cols) x 14 (rows)
- Mines: keep ~Hard density (~20.625%) calculated from the original 30x16 with 99 mines → round(0.20625 * cols * rows) ≈ 69 for 14x24 and 24x14.
- Apply only to Hard difficulty. Easy/Medium remain as-is (Phase 1 scope was UI baseline).
- Orientation detection must be multiplatform-safe. Suggested approach:
- Common: use
BoxWithConstraints to infer aspect ratio (width > height → landscape).
- Derive grid (cols, rows) from aspect ratio per rules above.
- Avoid platform-specific APIs in
commonMain.
Acceptance Criteria
- Hard difficulty renders 14x24 in portrait and 24x14 in landscape.
- Mines count uses a density consistent with Hard (≈20.6%), rounded to nearest integer.
- No crashes on orientation changes; grid re-composes correctly.
- Spotless/KtLint/Detekt pass; no global rule changes.
- Works on Android, iOS, Desktop, and Wasm.
Non-Goals (this issue)
- Zooming/pinch-to-zoom
- Persisted settings or dynamic scaling beyond the two layouts
Labels
- project:minesweeper, phase:2, enhancement, ux
Summary
Hard difficulty grid should adapt to device orientation to keep cells readable. In portrait, use a tall grid; in landscape, use a wide grid. Keep mine density consistent with the current Hard baseline.
Details
BoxWithConstraintsto infer aspect ratio (width > height → landscape).commonMain.Acceptance Criteria
Non-Goals (this issue)
Labels