private boolean collision() {
        if (game.getRacquet1().getBounds().intersects(getBounds())) {
            double intersect = getBounds().getCenterY() - (game.getRacquet1().getBounds().getCenterY()-(game.getRacquet1().HEIGHT/2));
            if(Math.abs(intersect) < (game.getRacquet1().HEIGHT/3)){
                ya = -1;
            }else if(Math.abs(intersect) > (game.getRacquet1().HEIGHT/3)*2) {
                ya = 1;
            }
            else {
                ya = 0;
            }
            System.out.println(intersect);
            raqueta = 1;
            return true;
        }else if (game.getRacquet2().getBounds().intersects(getBounds())){
            double intersect = getBounds().getCenterY()-(game.getRacquet2().getBounds().getCenterY()-(game.getRacquet2().HEIGHT/2));
            if(Math.abs(intersect) < (game.getRacquet2().HEIGHT/3)){
                ya = 1;
            }else if(Math.abs(intersect) > (game.getRacquet2().HEIGHT/3)*2) {
                ya = -1;
            }
            else {
                ya = 0;
            }
            raqueta = 2;
            return true;
        }else return false;
    }