public GameSimulation(final char[][] newMap) {
        maxGold = 0;
        // This is m
        height = newMap[0].length;
        // This is n
        width = newMap.length;

        /* Inversely store as the task requirement. But the the point (1, m)
         * becomes (0, m-1). */
        map = new char[width][height];
        for (int i = 0; i < width; i++) {
            for (int j = 0; j < height; j++) {
                map[i][j] = newMap[i][j];
                if (map[i][j] == MINER) {
                    minerPos = new Point(i, j);
                } else if (map[i][j] == GOLD) {
                    maxGold++;
                    // Record gold position
                    goldSet.add(new Point(i, j));
                } else if (map[i][j] == LIFT || map[i][j] == OPEN) {
                    liftPos = new Point(i, j);
                }
            }
        }

        isFalling = new boolean[width][height];
        for (int i = 0; i < width; i++) {
            // All rocks default state is not falling down.
            Arrays.fill(isFalling[i], false);
        }
        score = 0;
        goldCollected = 0;
        numOfMoves = 0;
        gameState = STATE_RUNNING;
    }