Help with this method for a minesweeper game in JAVA /** * This updates the map
ID: 3605540 • Letter: H
Question
Help with this method for a minesweeper game in JAVA /** * This updates the map with each unswept mine shown with the Config.HIDDEN_MINE * character. Swept mines will already be mapped and so should not be changed. * This method does not print out anything. * * @param map An array containing the map. On return the map shows unswept mines. * @param mines An array indicating which locations have mines. No changes * are made to the mines array. */ public static void showMines(char[][] map, boolean[][] mines) { return; //FIXME }
Explanation / Answer
/** * This updates the map with each unswept mine shown with the Config.HIDDEN_MINE * character. Swept mines will already be mapped and so should not be changed. * This method does not print out anything. * * @param map An array containing the map. On return the map shows unswept mines. * @param mines An array indicating which locations have mines. No changes * are made to the mines array. */ public static void showMines(char[][] map, boolean[][] mines) { for(int i = 0; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.