Check the progress here. All decisions will be explained there. There's a different repo for the UI. Check it here
# Clone this repo
git clone https://github.com/zeratulmdq/minesweeper.git
# cd into the folder
cd minesweeper
# Install dependencies
composer install
# Run the server
php artisan serve
# Play!
chromium http://localhost:8000
// Square
{
row: int,
column: int,
status: int,
hasMine: boolean,
neighbours: int
}
// Game (Minesweeper)
{
rows: int,
columns: int,
mines: int,
over: boolean,
won: boolean,
squares: Array (Squares),
created_at: Date,
updated_at: Date
}
POST /games To create a new game. Will be persisted automatically.
# Expected params
columns: int, required, min:20, max:30
rows: int, required, min:20, max:30
mines: int, required, min:20, max:30
# Returns
An instance of Game
PATCH /games/{id}/squares/{id}/reveal To reveal the selected mine and necessary neighbours
# Expected params
columns: int, required, min:20, max:30
rows: int, required, min:20, max:30
mines: int, required, min:20, max:30
# Returns
An instance of Game
GET /games/{id} Returns the selected game if exists
# Expected params
None
# Returns
An instance of Game