public void setPosition()
    {
        setLocation(x,y);
        setImage(bondImage);

        if (speed > maxSpeed)
        {
            speed = maxSpeed;
        }
        else if (movement)
        {
            speed++;
        }
        else
        {
            speed = 0;
        }
        if (x<0)
        {
            x = 0;
        }
        else if (x>1000)
        {
            x = 1000;
        }
        if (energy < energyMax)
        {
            energy+= 0.1;
        }
        if (hitpoint <= 0.0)
        {
            hitpoint = 0.0;
            dead = true;
            imageFrames = 4;
        }
    }