Skip to content

raapperez/minesweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minesweeper

A minesweeper game made in ruby

How to install

  1. Install ruby
  2. Clone the repository

Running random example

ruby bin/example.rb

Playing the game

ruby bin/minesweeper_game.rb

Instructions:

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

To run all tests

ruby test/main.rb

Considerations

  • 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.

About

A minesweeper game made in ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages