@Override
    public void update(MiniGame game)
    {
        if (calculateDistanceToTarget() < INTERSECTION_RADIUS)
        {
            stopMovingToTarget();
            
            
            
            if (pathIndex < path.size() - 1 && !movingBackToFirst && currentIntersection.open)
            {
                Road roadInBetween = ((pathXDataModel)game.getDataModel()).getRoad(currentIntersection, path.get(pathIndex+1));
                if (roadInBetween.open)
                {
                    pathIndex++;
                    movingBackToFirst = pathIndex == path.size() - 1 ? true : false;
                }
            } else if (pathIndex > 0 && currentIntersection.open)
            {
                pathIndex--;
                movingBackToFirst = pathIndex == 0 ? false : true;
            }
            updatePath(game);
        }
        super.update(game);
    }