I hereby claim:
- I am radanskoric on github.
- I am radan (https://keybase.io/radan) on keybase.
- I have a public key whose fingerprint is 41F2 EF64 3313 5FFB 1084 F96F 4F46 CCB4 AE6D D809
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # == NOTE == | |
| # This gist is accompnaying a blog post on the topic: https://radanskoric.com/articles/understand-rails-async-db-queries | |
| require 'bundler/inline' | |
| require "benchmark" | |
| require "debug" | |
| require "uri" | |
| gemfile do | |
| source 'https://rubygems.org' |
| # This is a little experiment in using Turbo Frames and Streams without Rails. | |
| # Built using just plain Sinatra as the web server. | |
| # | |
| # Make sure that you have sinatra and puma (or some other server) installed: | |
| # gem install sinatra | |
| # gem install puma | |
| # | |
| # You can then run the app with: | |
| # ruby app.rb | |
| require 'sinatra' |
Implement a CLI game of Minesweeper using Ruby. Make sure to cover it with tests. The game should work by generating a minesweeper board, printing it and asking the user for the coordinates of the cell they wish to uncover. The board should be printed using the following notation: # for a still hidden field, 1-8 for a field with that many mines in the neighborhood, . for a field with no neighbors with mines and * for a mine. The program should correctly detect losing the game by hitting a mine and winning the game by uncovering all the fields without mines.