Question: Please help me make Minesweeper game with Vanilla Javascript Requirements: For this assignment you are to implement a Vanilla JavaScript (ES5) version of Minesweeper. Feel

Please help me make Minesweeper game with Vanilla Javascript

Please help me make Minesweeper game with Vanilla Javascript Requirements: For this

Requirements: For this assignment you are to implement a Vanilla JavaScript (ES5) version of Minesweeper. Feel free to use any HTML5 controls in your solution. Consider the following algorithm: Generate a random n x m grid of cells for the user to click on, with n and m being the respective width and height of the grid. After the user clicks on a cell, randomly place x mines on the grid (with x being the number of mines for your game.) Don't place a mine on the cell the user clicked on. (This is so the user gets one free click and the game isn't lost on first try.) 1. 2. If no mines are adjacent to the cell, simply place O in the cell or shade the background a different color to show contrast to the user. a. 3. Keep collecting clicks from the user, revealing the number of adjacent mines under each tile. 4. The game is won when all cells not containing mines are exposed and a mine was not clicked. 5. The game is lost immediately when a mine is clicked. Points will be awarded based on correctness and creativity. Some features that aren't required but are nice to have include: .Changing the color of the number of adjacent mines of a cell . Giving the user the ability to flag a cell (via mouse right click) Ability for the user to play modes of difficulty, for instance Easy Mode might be a 10x 10 grid with 10 mines while Hard Mode might be a 100 x 100 grid with 60 mines (these numbers are up to the developer.) .With the above implementation, if no mines are adjacent to a particular cell the number 0 is shown in the cell. As an alternative, if the user clicks on a cell with no adjacent mines, you can reveal all "empty" cells (this will be demonstrated in class.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!