@Override
    protected void xMovement(double time) {
        if (!xObstacleAhead(time)) {
            if (currentCoord.getX() + 30 > 800) {
                if (AppFrame.incFrameNumber()) {
                    currentCoord.setX(0);
                } else {
                    gameOver = true;
                }
            } else if (currentCoord.getX() < 0) {
                if (AppFrame.decFrameNumber()) {
                    currentCoord.setX(800 - 60);
                } else {
                    currentCoord.setX(0);
                }
            } else {
                if (!(XForces.size() == 0)) {
                    currentCoord.setX(currentCoord.getX() + (int) Math.round(currentHorizontalSpeed * time));
                    currentHorizontalSpeed = currentHorizontalSpeed
                            + Mechanics.countResultAcceleration(this.mass, XForces.values()) * time;
                } else {
                    currentCoord.setX(currentCoord.getX() + (int) Math.round(heroOwnHorizontalSpeed * time));
                }
            }
        }
    }