A minesweeper game made in ruby
- Install ruby
- Clone the repository
ruby bin/example.rb
ruby bin/minesweeper_game.rb
You must enter the values separeted by space:
Enter the width, height and num_mines: 3 3 1
Enter the action (c to click or f to flag), x and y: c 0 0
ruby test/main.rb
- I'm not a ruby programmer... yet.
- I've researched a lot of ruby syntax and documentation on the internet. It wouldn't be possible for me to complete this challenge in offline mode.
- The class status_printer counts and prints each type of cell at moment. It's another way to show the table state. As it was one of the last things I made, I tried to use some advanced methods I'm used to in Javascript like groupBy and reduce.
- There are tests that validates the solution.
- You can play the game with the
bin/minesweeper_game.rb
file to check the solution. - I had fun with the challenge. Thank you.