public void checkEnemyCollision(ArrayList<Enemy> list){
        for(int i=0;i<list.size();i++){
            double w=.5*(list.get(i).getCWidth()+getWidth());
            double h=.5*(list.get(i).getCHeight()+getHeight());
            double dx=list.get(i).getCCenterX()-getCenterX();
            double dy=list.get(i).getCCenterY()-getCenterY();
            if(Math.abs(dx)<=w&&Math.abs(dy)<=h){
                double wy=w*dy;
                double hx=h*dx;
                if(wy>hx){
                    if(wy>-hx){
                        // Collision is on the bottom side
                    }else{
                        // Collision is from the left side
                        turn();
                        list.get(i).turn();
                    }
                }else{
                    if(wy>-hx){
                        // Collision is on the right side
                        turn();
                        list.get(i).turn();
                    }else{
                        // Collision is on the top side
                    }
                }
            }
        }
    }