public char[][] generateMap() {

        //CREATING THE BASE FOR THE MAP
        char[][] map = new char[height][width];

        for (int i = 0; i < height; i++) {
            for (int j = 0; j < width; j++) {
                map[i][j] = '#';
            }
        }

        map[0][0] = '*';
        map[height - 1][width - 1] = '*';


        //CREATING THE EMPTY AREAS
        double laskuri = (height * width) * (empty * 0.01);
        System.out.println("TYHJIÄ: " + laskuri);
        while (laskuri > 0) {
            int h = random.nextInt(height);
            int w = random.nextInt(width);
            if ((h != 0 || w != 0) && (h != map.length - 1 || w != map[0].length - 1)) {
                map[h][w] = '.';
            }
            laskuri--;
        }

//        printMap(map);

        return map;
    }