Closed gstark closed 6 years ago
dashing-crow.surge.sh
https://github.com/gabeo14/minesweeper
I'll come back through to get the last few requirements once I'm caught up and have a chance. Thanks Gavin!
Your homework was marked: Meets Expectations
“Gavin Approved!” — via Jason L Perry
Minesweeper
Description
Minesweeper is a logic game where mines are hidden in a grid of squares. The object is to reveal all the safe squares without stepping on a mine. The game became famous when Microsoft included it with Windows 3.1 but its origins go even further back.
This weekend's lab is to build a front end interface to Minesweeper against a backend API. The API will handle all of the game logic for you.
The API documentation is available at https://minesweeper-api.herokuapp.com
The API endpoints will be at that domain as well, i.e.,
https://minesweeper-api.herokuapp.com/game
. I will have that live for you later tonight!Deliverables
gh-pages
, etc.Explorer Mode
check
action of the Game API).flag
action of the Game API).Adventure Mode
The design of clicking and double clicking to reveal and flag squares is risky, it's too easy for players to misclick and reveal a bomb they meant to flagg! Unfortunately the DOM doesn't have an event for "right click".
Your task for Adventure Mode is to make the game work like the Windows game and allow you to right click on a cell to place a flag. Hint:
event.which
.Epic Mode
"Offline" play. Implement the game's logic yourself rather than use the external API.
Additional Resources