1
0

fixed a few js errors in BFJoustBot_script

This commit is contained in:
Mike Schwörer 2014-10-15 11:33:09 +02:00
parent 63669229eb
commit 371d881436

View File

@ -53,19 +53,19 @@ var RepetitionState = {
OPEN: 10, OPEN: 10,
CLOSED: 11, CLOSED: 11,
AWAITING_NUMBER: 12, AWAITING_NUMBER: 12,
FINISHED: 13, FINISHED: 13
}; };
var RepetitionMode = { var RepetitionMode = {
UNDEFINIED: 10, UNDEFINIED: 10,
ITERATIVE: 11, ITERATIVE: 11,
RECURSIVE: 12, RECURSIVE: 12
}; };
var MatchWinner = { var MatchWinner = {
UNDEFINIED: 0, UNDEFINIED: 0,
PLAYER_1: 10, PLAYER_1: 10,
DRAW: 15, DRAW: 15,
PLAYER_2: 20, PLAYER_2: 20,
ABORT: -1, ABORT: -1
}; };
var BF_CHARS = ['+', '-', '<', '>', '[', ']', '.']; var BF_CHARS = ['+', '-', '<', '>', '[', ']', '.'];
@ -443,7 +443,7 @@ BFMatch.prototype.start = function(canvas, width, height, speed) {
BFMatch.prototype.stop = function(winner) { BFMatch.prototype.stop = function(winner) {
if (winner == MatchWinner.UNDEFINIED) if (winner == MatchWinner.UNDEFINIED)
throw new "can't stop on undef"; throw ("can't stop on undef");
if (this._intervalID != -1) { if (this._intervalID != -1) {
clearInterval(this._intervalID); clearInterval(this._intervalID);
@ -466,7 +466,7 @@ BFMatch.prototype.stop = function(winner) {
this.winner = MatchWinner.ABORT; this.winner = MatchWinner.ABORT;
break; break;
default: default:
throw new "no-enum value in stop()"; throw ( "no-enum value in stop()" );
} }
}; };