Skip to content

Commit

Permalink
Edited WebContent/game.js via GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
MathildeLemee committed Sep 18, 2011
1 parent 6a79d9f commit 5c3c31e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WebContent/game.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 5c3c31e

Please sign in to comment.