public void update() {

	super.update();

	if (Game.game.server != null) {
	    time = (time > 1000000000) ? 0 : time + 1;
	    if (time % 60 == 0) {
		nx = (rand.nextInt(3) - 1) * speed;
		ny = (rand.nextInt(3) - 1) * speed;

		if (isCollision(x + nx, y)) {
		    nx *= -speed;
		}
		if (isCollision(x, ny + y)) {
		    ny *= -speed;
		}

		if (rand.nextInt(4) == 0) {
		    nx = 0;
		    ny = 0;
		}
	    }
	}

	if (nx == 0 && ny == 0) {
	    moving = false;
	} else {
	    move(nx, ny);
	}

    }