game+function+algoritme?

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
 
M

me

thnks i wil check it out..

lallous said:
Hello

Don't know if this will help http://lgwm.org/o95js/o95js.zip , but it a game
that uses two 6x6 tables and allows user to click and match.

--
Elias
http://lgwm.org/
me said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top