MATLAB minesweeper function solBoard = markSquaresAdjTomines(solBoard) % Inputs: solBoard is a 2D array of integers in the range [0-9] & [11-13] % that represents the state of the player's board,...


MATLAB minesweeper function solBoard = markSquaresAdjTomines(solBoard)


% Inputs: solBoard is a 2D array of integers in the range [0-9] & [11-13]


% that represents the state of the player's board, where


% 0: empty square


%1-8: Squares with digits 1 to 8


% 9: mine square


% 11: unrevealed square (square that is still flipped over)


% 12: flagged mine square (player thinks there is mine a this square)


% 13: exploded mine square (player picked a mine square)


% Returns: solBoard is MODIFIED so that all adjecent squares to the mine


% squares are marked with the correct digits b/n 1-8









May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here