This README would normally document whatever steps are necessary to get the application up and running. Things you may want to cover:
-
Ruby version 2.4.1
-
System dependencies Rails 5.2.4
-
Configuration to run it local Clone the Git Repository
git clone [email protected]:pablorodriguez/minesweeper-api.git
-
Database creation
bundle exec rake db:create
bundle exec rake db:migrate
-
How to run the test suite
bundle exec rspec
-
Deployment instructions Add Heroku Repository
git add heroku https://git.heroku.com/minesweeper-api-mdz.git
git push heroku
Development notes
- First I focus on the logic of the game
- Add logic to get the adjacents cells from one cell
- Add test to validate adjacents on borders
- Check if all the adjacents cells do not have a mine
- Clear all adjacents cell and repeat with a recursive method call
- Add print logic
- Add more test to validate the cell contents
Next: Start with the API
- Refactor to move the game service into a Model
- Add model validations and specs
- Add Controller and specs
- Do multiple refactos and add more test
- More validation to the model
Next: Strat with the client to consume the API
Deployed on Heroku url: https://minesweeper-api-mdz.herokuapp.com There you can get the list of game created with some basic information, IMPORTANT !!! IT SHOW WHERETHE MINES ARE