M
me
hey all,
I want to make a 4 on a row game (you know the red and yellow or blue round
coins that you put in a empty square with holes and the first 4 on a row is
the winner)
i thougth on many solutions? like a matrix first row horizintal a,a1:1
a,b1:2 a,c1:3 etc second row b,a1:1 b,b1:3 etc were the number after the : =
the holes number
and make a check if (a,a1),(b,a1),(c,a1),d,a1) = true this is the first row
vertical
or must i make a more simple function like example:
[1][2][4][8][16][32]
[64][128][256][512][1024]
etc etc til also 6 row vertical
example:winnerarray[x]=15 and all the winner numbers counted
and if the user RED has examp the numbers 1+2+4+8 =15 and is a winner i do a
check?
if (redcount(1+2+4+8)&winnerarray[x]==winnerarray[x]){alert("YES!!")}
any help ? or a link were there is a good explaining of this game function..
ps i hate the games were you must do dumb 10000 ifs and else..
best regard.. newbie=gamemaker
after i finist i wil make it in flash but action script is the same logic
I want to make a 4 on a row game (you know the red and yellow or blue round
coins that you put in a empty square with holes and the first 4 on a row is
the winner)
i thougth on many solutions? like a matrix first row horizintal a,a1:1
a,b1:2 a,c1:3 etc second row b,a1:1 b,b1:3 etc were the number after the : =
the holes number
and make a check if (a,a1),(b,a1),(c,a1),d,a1) = true this is the first row
vertical
or must i make a more simple function like example:
[1][2][4][8][16][32]
[64][128][256][512][1024]
etc etc til also 6 row vertical
example:winnerarray[x]=15 and all the winner numbers counted
and if the user RED has examp the numbers 1+2+4+8 =15 and is a winner i do a
check?
if (redcount(1+2+4+8)&winnerarray[x]==winnerarray[x]){alert("YES!!")}
any help ? or a link were there is a good explaining of this game function..
ps i hate the games were you must do dumb 10000 ifs and else..
best regard.. newbie=gamemaker
after i finist i wil make it in flash but action script is the same logic