Ad
  • Custom User Avatar

    DO NOT WASTING TIME WITH JAVA!!!!!No one accept this problem with Java. I passed with python.

  • Custom User Avatar

    Freak out about Java OutputStream. How to solve?

  • Custom User Avatar

    Interactive class "Game.java". Why mark me as spoiler??? It's not the solution, just a debug program.

    /**
     * @author zhe
     * @createTime 2019/6/26
     * @description
     */
    
    public class Game {
    
        private static int[][] answerMap;
        private static int[][] initMap;
        private static int minesN;
    
        public static void newGame(String map) {
            answerMap = new int[map.split("\n").length][];
            minesN = MineSweeper.initMap(map, answerMap);
        }
    
        public static void read(String map) {
            initMap = new int[map.split("\n").length][];
            MineSweeper.initMap(map, initMap);
        }
    
        public static int getMinesN() {
            return minesN;
        }
    
        public static int open(int x, int y) {
            if (answerMap[x][y] == MineSweeper.MINE) {
                System.err.println("BOOM!!!!" + x + ' ' + y);
            }
            return answerMap[x][y];
        }
    
    }