Skip to content

Lock board generation to 9×9 with difficulty-based mine counts #74

Description

@pekomon

Background

  • Difficulty presets currently change board width/height, which drives layout bugs and inconsistent spacing across platforms.
  • Product requirement: always render a 9×9 grid and vary only the number of mines per difficulty.
  • History, timer, and win detection logic assumes variable board sizes and needs to be normalized.

Proposal

  1. Update Difficulty to store only a mineCount (and optional label resources) while keeping board dimensions fixed at 9×9.
  2. Refactor board generation (newGame, generateBoard) and any dependent logic/tests to respect the fixed size.
  3. Adjust UI copy, history dialog, and tests to reflect the new mine counts (e.g., Medium = 40 mines on 9×9).
  4. Add regression tests ensuring the generator produces 9×9 boards for every difficulty and mine counts match expectations.

Acceptance Criteria

  • All difficulties produce a 9×9 board in runtime and unit tests.
  • Mine counts match the previous presets (Easy 10, Medium 40, Hard 99) and win conditions still trigger correctly.
  • UI strings/history entries reference mine counts, not board size, where applicable.
  • ./gradlew test and ./gradlew build succeed; update snapshots/docs if any metadata mentions board dimensions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    phase:2Phase 2project:minesweeperAll issues/PRs for the Minesweeper subprojecttype:refactorRefactoringuiUser InterfaceuxUser experience / usability

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions