hi i am new in programming.i want to write a function “minesweeper(int, int, int )” that takes 3 arguments a, b, and p and produces an a-by-b Boolean array where each entry is occupied with probability p (e.g. if the randomly generated number is less than or equal to p, the cell is referred as empty else occupied) . In the minesweeper game, occupied cells represent bombs and empty cells represent safe cells. Print out the array using an asterisk for bombs and a period for safe cells. Then, replace each safe square with the number of neighboring bombs (above, below, left, right, or diagonal).kindly help and guide me
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.