Question: % Step 2 : add the numbers to each bomb location based on number of bombs its % touching BoardFINAL = board; for r =

% Step2: add the numbers to each bomb location based on number of bombs its
% touching
BoardFINAL = board;
for r=1:1 : row
for c=1:1:col
if Board (r,c)=-1
if r==1&&c==1
AROUND , Board (r+1,c), Board (r+1,c+1);
BOMBcount = abs(sum(AROUND));
BoardFINAL (r,c)= BOMBcount;
elseif r==1&&c==col
elseif
elseif
elseif r==1
elseif
elseif |
elseif
else
AROUND Board (r-1,c-1), Board (r-1,c), Board (r-1,c+1), Board (r,c-1), Board (r,c+1), Board (r+1,c-1), Board (r+1,c), Board (r+1,c+1)
BOMBcount = abs(sum(AROUND));
BoardFINAL =(r,c)= BOMBcount;
end
end
How do i code The rest of this ifelse statement For minesweeper
% Step 2 : add the numbers to each bomb location

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 Programming Questions!