function SpriteManager() {

	var sprites = new Array();

	/**
	 * add sprite to collection
	 *
	 * @return void
	 */
	this.addSprite = function(sprite) {
		sprite.setManager(this);
		sprites.push(sprite);
	};

	/**
	 * set player sprite that reacts on the mouse
	 *
	 * @return void
	 */
	this.setPlayer = function(next_player) {

		$.each(sprites, function(k, v) {
			v.setPlayer(false);
		});
		sprites[next_player].setPlayer(true);
	}

	/**
	 * print out manager status
	 *
	 * @return void
	 */
	this.status = function() {
		var status = {sprites: {}};
		$.each(sprites, function(k, sprite) {
			status.sprites[k] = {isPlayer: sprite.isPlayer(), object: sprite};
		});
		console.log(status);
	}

	/**
	 * update loop
	 *
	 * @return void
	 */
	this.updateSprites = function() {
		var self = this;
		window.setTimeout(function() {
			$.each(sprites, function(k, sprite) {
				sprite.update();
			});
			self.updateSprites();
		}, 1000 / 25);
	}

}

@@ -255,24 +255,56 @@
 e mouse%0A%09 *%0A
+%09 * @param %7BSprite%7D next_player%0A
 %09 * @return 
@@ -300,32 +300,32 @@
  * @return void%0A
-
 %09 */%0A%09this.setPl
@@ -355,17 +355,16 @@
 ayer) %7B%0A
-%0A
 %09%09$.each
@@ -412,23 +412,78 @@
 (false);
+%0A%0A%09%09%09if (v == next_player) %7B%0A%09%09%09%09next_player = k;%0A%09%09%09%7D
 %0A%09%09%7D);%0A
+%0A
 %09%09sprite

change set player to accept an object