Skip to content

Commit

Permalink
fixing undefined bugs#1
Browse files Browse the repository at this point in the history
  • Loading branch information
4m4n5 committed Aug 13, 2014
1 parent 42f1339 commit 11cb9a0
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions js/expert.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ grid[5] = new Array(9);
grid[6] = new Array(9);
grid[7] = new Array(9);

for(var fix=0; fix<=9; fix++){
grid[0][fix]=20;
grid[7][fix]=25;
}

for(var fix2 = 0; fix2 <= 7; fix2++){
grid[fix2][0]=30;
grid[fix2][8]=35;
}


grid[0][0]=-100;

Expand Down Expand Up @@ -1033,7 +1043,7 @@ function AIMove(){


a=l-1, b=i;
if(a>1 && b<7){
if(a > 1 &&b <= 6){
gridc[l][i]=0;
gridc[a][b]=1;
columnsCopy[i]--;
Expand Down Expand Up @@ -1100,7 +1110,7 @@ function AIMove(){


var counter6 = 0, direction6 = 5;
if(a > 1 && b < 6){
if(a > 1 &&b <= 6){

gridc[l][i]=0;
gridc[l-1][i]=1;
Expand Down Expand Up @@ -1234,7 +1244,7 @@ function AIMove(){


a=l2, b=k;
if(a > 1 && b < 6){
if(a > 1 &&b <= 6){


counter2 = 0, direction2 = 5;
Expand Down Expand Up @@ -1294,7 +1304,7 @@ function AIMove(){


var counter6 = 0, direction6 = 5;
if(a>1&&b<7){
if(a > 1 &&b <= 6){


if (gridc[a][b] === gridc[a + 1][b + 1]) {
Expand Down Expand Up @@ -1423,7 +1433,7 @@ function AIMove(){



if(a > 1 && b < 6){
if(a > 1 &&b <= 6){


counter2 = 0, direction2 = 5;
Expand Down Expand Up @@ -1480,7 +1490,7 @@ function AIMove(){


var counter6 = 0, direction6 = 5;
if(a > 1 && b < 6){
if(a > 1 &&b <= 6){

if (gridc[a][b] === gridc[a + 1][b + 1]) {
counter6 += 1;
Expand Down Expand Up @@ -1608,7 +1618,7 @@ function AIMove(){



if(a > 1 && b < 6){
if(a > 1 &&b <= 6){


counter2 = 0, direction2 = 5;
Expand Down Expand Up @@ -1665,7 +1675,7 @@ function AIMove(){


var counter6 = 0, direction6 = 5;
if(a>1&&b<7){
if(a > 1 &&b <= 6){

if (gridc[a][b] === gridc[a + 1][b + 1]) {
counter6 += 1;
Expand Down Expand Up @@ -1799,7 +1809,7 @@ function AIMove(){



if(a>1 && b<7){
if(a > 1 &&b <= 6){


counter2 = 0, direction2 = 5;
Expand Down Expand Up @@ -1856,7 +1866,7 @@ function AIMove(){


var counter6 = 0, direction6 = 5;
if(a>1&&b<7){
if(a > 1 &&b <= 6){

if (gridc[a][b] === gridc[a + 1][b + 1]) {
counter6 += 1;
Expand Down

0 comments on commit 11cb9a0

Please sign in to comment.