ktrammell95 / assignments

SDG Cohort XI Assignments
0 stars 0 forks source link

Week 04 Day 4 - Minesweeper #15

Open gstark opened 5 years ago

gstark commented 5 years ago

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

Explorer Mode

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