Skip to content

Mhmd-14/Minesweeper1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Minesweeper1

#Define a function called mines which is similar to minesweeper chessboard game #The code will get the number of rows and columns as arguments when the function is called #The code will return the number of mines available around the "." in all directions : Horizantally, vertically and diagonal #For example you choose the number of rows 4 and the number of columns 5 and you fill the board as below #Note you should fill the board either with '*' which is the mine or a dot '.' #The original matrix you filled is

[. * . * *]

[* . . * .]

[* * . * *]

[. . * . .]

#The result matrix will be

[[2, '', 3, '', '*']

['', 4, 5, '', 5]

['', '', 4, '', '']

['.', 3, '*', 3, '.']]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages