function Level(game, level) {
	this.game = game;
	this.remaining = level;
	this.interval = undefined;
	this.period = 4;
	this.intervalTime = 10;
	this.velocity = 2 * Math.PI / (1000 * this.period);
	this.forward = true;

	this.game.setRemaining(level);

	var me = this;
	this.game.board.on('click', function() {
		if (me.interval) {
			me.clicked();
		} else {
			me.start();
		}
	});
}

Level.prototype.start = function() {
	this.generateTarget();
	var me = this;
	this.interval = setInterval(function() {
		me.redraw();
	}, this.intervalTime);
};

Level.prototype.clicked = function() {
	this.forward = !this.forward;
	this.remaining--;
	var targetRadiusAngle = 2 * this.targetRadius / (this.game.outerRadius + this.game.innerRadius) + this.game.arcWidth;
	var modArcCenter = (10 * Math.PI + this.game.arcCenter) % (2 * Math.PI);
	if (modArcCenter >= this.targetAngle - targetRadiusAngle && modArcCenter <= this.targetAngle + targetRadiusAngle) {
		this.game.setRemaining(this.remaining);
		if (this.remaining === 0) {
			this.gameOver(true);
		} else {
			this.generateTarget();
		}
	} else {
		this.gameOver(false);
	}
};

Level.prototype.redraw = function() {
	this.game.arcCenter += this.velocity * this.intervalTime * (this.forward ? 1 : -1);
	this.game.arc.startAngle(this.game.arcCenter - this.game.arcWidth);
	this.game.arcEl
		.datum({endAngle: this.game.arcCenter + this.game.arcWidth})
		.attr('d', this.game.arc);
};

Level.prototype.generateTarget = function() {
	if (this.target) {
		this.target.remove();
	}
	this.targetAngle = 2 * Math.PI * Math.random();
	var r = (this.game.outerRadius + this.game.innerRadius) / 2;
	var x = r * Math.sin(this.targetAngle);
	var y = -r * Math.cos(this.targetAngle);
	this.targetRadius = (this.game.outerRadius - this.game.innerRadius) / 2 - 5;
	this.target = this.game.svg.append('circle')
		.attr('transform', 'translate(' + x + ',' + y + ')')
		.attr('r', this.targetRadius)
		.style('fill', 'yellow');
};

Level.prototype.gameOver = function(win) {
	clearInterval(this.interval);
	this.interval = undefined;
};

@@ -42,16 +42,37 @@
 = game;%0A
+%09this.level = level;%0A
 %09this.re
@@ -1264,16 +1264,74 @@
  : -1);%0A
+%09this.render();%0A%7D;%0A%0ALevel.prototype.render = function() %7B%0A
 %09this.ga
@@ -2030,24 +2030,130 @@
 llow');%0A%7D;%0A%0A
+Level.prototype.reset = function() %7B%0A%09this.target.remove();%0A%09this.game.arcCenter = 0;%0A%09this.render();%0A%7D;%0A%0A
 Level.protot
@@ -2242,11 +2242,77 @@
 efined;%0A
+%09this.reset();%0A%09this.game.startLevel(this.level + (win ? 1 : 0));%0A
 %7D;%0A

Add level resetting