Minesweeper Board using arrays in JavaScript
This is an asssessment done in SDV503 at NMIT 2022
- The aim of the assessment is to create a JavaScript program that takes an input arrays of where bombs are on a minesweeper board and translate it to a board where each cells value is the number of neighboring mines.
E.G
Input – [ [0,1,0,0] [0,0,1,0] [0,1,0,1] [1,1,0,0] ]
(0 represents an empty space, 1 represents a bomb)
Output – [ [1,x,2,1] [2,3,x,2] [3,x,4,x] [x,x,3,1] ]
(x represents a mine, digits represent the number of adjacent mines)
- The task also requires a Design.MD document explaining the code.
Created by Flynn Stevens, NMIT Student, 2022