int predictCollision() {
        double raw = (ball.getX() - 10) / (double) -ball.getXSpeed() * ball.getYSpeed() + ball.getY();
        if (raw <= 450 && raw >= 10)
            return (int) raw;
        if (raw > 450)
            if (((int) raw - 10) / 440 % 2 == 0) {
                raw = 10 + (raw - 10) % 440;
            }
            else {
                raw = 10 + (440 - (raw - 10) % 440);
            }
        if (raw < 10)
            if (((int) raw - 10) / 440 % 2 == 0) {
                raw = 10 + (10 - (raw - 10) % 440);
            }
            else if (((int) raw - 10) / 440 % 2 == -1) {
                raw = 440 + (10 + (raw - 10) % 440);
            }
        return (int) raw;
    }