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
- Fork it ( https://github.com/[my-github-username]/mine-sweeper/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request