MineSweeper

TODO: Write a gem description

Installation

Add this line to your application's Gemfile:

gem 'mine-sweeper'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mine-sweeper

Usage

Launch Game

Play MineSweeper in pry or irb with only two commands:

$ require 'mine-sweeper'
$ MineSweeper::Game.new

Commands

Every turn you will be guided to select a row, a column and a command.

'C' to clear a space. This will not work if the coordinates are flagged.

'A' to auto-clear around the coordinates. This only works if (1) the coordinates are already cleared and (2) the number of adjacent flags matches the number of adjacent mines.

'F' to flag a space as a mine.

'U' to un-flag, or remove a flag.

The number next to the '⚑' symbol shows you how many flags are left to place."

Contributing

  1. Fork it ( https://github.com/[my-github-username]/mine-sweeper/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request