public void attacking() {
		if (getDistanceToTarget() > SEEKING_TO_ATTACKING_DISTANCE) {
			setState(STATE_SEEKING, "distance to " + target + " is outside attacking distance while attacking");
			return;
		}
		if (isGunLoaded())
			attackTarget();
		if (!isReadyToFire()) {
			setState(STATE_RETREATING, "gun is jammed or empty while attacking");
			return;
		}
		if (isHitByOpponent()) {
			setState(STATE_DEFENDING, "I've been shot by an opponent while attacking");
			return;
		}
	}