Skip to content

GameIO interface #17

Description

@Namdrib

Having a way to build and/or write a minefield

Can be used for automated and non-automated testing by allowing for specific contrived situations.

At the very least must take the x and y dimensions of the board and the number of mines.
That way, it can correctly throw exceptions if any of the above is an impossible situation (e.g. all cells are mines, map too small, ...)

could have something like:

  • read an exact representation of the board (which cells have mines, which ones are open, etc.)
  • only read the location of mines

Probably requires some refactoring of GameImpl by shifting functions around and extracting some functionality into helpers

This interface should pave the way to unit testing capabilities

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementAn extension that isn't necessary

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions