public void placeEntrance() {
        boolean valid = false;

        while (valid == false) {
            double r1 = Math.random(); // X or Y wall
            double r2 = Math.random(); // 0 or Last
            Random rn = new Random();
            int row = rn.nextInt(grid.length - 2) + 1;
            if (r1 > 0.5) {
                if (r2 > 0.5) {
                    if (checkEntranceRoom(1, row)) {
                        grid[0][row] = new Room(RoomType.entrance, true);
                        setEntranceX(0);
                        setEntranceY(row);
                        valid = true;
                    }
                } else {
                    if (checkEntranceRoom(grid.length - 2, row)) {
                        grid[grid.length - 1][row] = new Room(
                                RoomType.entrance, true);
                        setEntranceX(grid.length - 1);
                        setEntranceY(row);
                        valid = true;
                    }
                }
            } else {
                if (r2 > 0.5) {
                    if (checkEntranceRoom(row, 1)) {
                        grid[row][0] = new Room(RoomType.entrance, true);
                        setEntranceX(row);
                        setEntranceY(0);
                        valid = true;
                    }
                } else {
                    if (checkEntranceRoom(row, grid.length - 2)) {
                        grid[row][grid.length - 1] = new Room(
                                RoomType.entrance, true);
                        setEntranceX(row);
                        setEntranceY(grid.length - 1);
                        valid = true;
                    }
                }
            }

        }
    }