private boolean processDot_r(int x, int y, int owner, boolean mask[][]) {
        if(isOnBorder(x, y)) {
            return false;
        }
        
        if(map[x][y].owner == owner && map[x][y].status) {
            return true;
        }
        
        if(mask[x][y]) {
            return true;
        }
        mask[x][y] = true;
        
        if(!processDot_r(x+1, y, owner, mask)) {
            return false;
        }
        if(!processDot_r(x-1, y, owner, mask)) {
            return false;
        }
        if(!processDot_r(x, y+1, owner, mask)) {
            return false;
        }
        if(!processDot_r(x, y-1, owner, mask)) {
            return false;
        }        
        
        return true;
    }