Making 4 on the row game

hey all,

just a quick question… i made a game 4 on the row…

that has a array(:slight_smile: that contains all possible winning matches…

but… that is the easy way…

i made a once a game tictac… (you know with the X and 0)
i defines every element from:

1, 2, 4,
8, 16, 32,
64,128, 256

arWin=[7,13,146,292,448,84,273,56,73];

/*
1, 2, 4,
8, 16, 32,
64,128, 256
*/
function setList(){
forms=document.game;
ar=[];
Count=0;
status=0;
for(x=1;x<10;x++){
if(forms[“vlak”+x].checked==true){
ar[ar.length]=forms[“vlak”+x].value;
Count+=Math.abs(forms[“vlak”+x].value);
status=Count;
}
}
for(i=0;i<arWin.length;i++){

if((Count & arWin*) == arWin*){
alert(arWin*)
}
}
}

this makes a simple tictactoe game but i want to make a 4 on a row…
but i have errors because he gives me a winnar while i dont have a winning e combination… any ideas for a gameengine ?

4 on a row has 7 x 6 rows