From 5c3c31e182d0d4f4c7d5eae377eab694e57f3cb1 Mon Sep 17 00:00:00 2001 From: MathildeLemee Date: Sun, 18 Sep 2011 22:00:20 +0300 Subject: [PATCH] Edited WebContent/game.js via GitHub --- WebContent/game.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebContent/game.js b/WebContent/game.js index 46ae70d..867d821 100644 --- a/WebContent/game.js +++ b/WebContent/game.js @@ -16,8 +16,8 @@ Game.prototype = { var all = this.fields.every(function(field) { return field != "_"; }); - var ligne = this.fields[0] + this.fields[1] + this.fields[2] + "|" + this.fields[3] + this.fields[4] + this.fields[5] + "|" + this.fields[6] + this.fields[7] + this.fields[8]; - var colonne = this.fields[0] + this.fields[3] + this.fields[6] + "|" + this.fields[1] + this.fields[4] + this.fields[7] + "|" + this.fields[2] + this.fields[5] + this.fields[8]; + var ligne = this.fields[0] + this.fields[1] + this.fields[2] + "|" + this.fields[3] + this.fields[4] + this.fields[5] + "|" + this.fields[6] + this.fields[7] + this.fields[8]+ "|"; + var colonne = this.fields[0] + this.fields[3] + this.fields[6] + "|" + this.fields[1] + this.fields[4] + this.fields[7] + "|" + this.fields[2] + this.fields[5] + this.fields[8]+ "|"; var diagonale = this.fields[0] + this.fields[4] + this.fields[8] + "|" + this.fields[2] + this.fields[4] + this.fields[6]; //check x win if ((ligne + colonne + diagonale).indexOf("XXX") != -1) {