public void getLocation()
    {
        setLocation(x, y);
        setImage(mage);

        // Speed control
        if(speed > maxSpeed)
        {
            speed = maxSpeed;
        }
        else if (movement)
        {   
            for(int i = 0; i <= 100; i++)
            {
                if (i == 100)
                {
                    speed++;
                }
            }
        }
        else
        {
            speed = 0;
        }
        if (energy < energyMax)
        {
            energy+= 0.1;
        }
        if (hitpoint <= 0.0)
        {
            hitpoint = 0.0;
            dead = true;
        }
    }