View Full Version : Help on game

08-01-2003, 05:49 PM
hFor all those experienced big brain Action gurus:
I have a game, I donít whatís it called in English, but the main idea that thereís 6x7 (42) blocks that should be filled with orange (the computer), or blue (the user), now who ever fills 4 blocks to the side of each other horizontally, vertically, or even diagonally will win, see:
This is what I got to so far:
And hereís the fla:
I could make it that when click on blue and select block become blue, which is very basic, hereís what I couldnít do:
1. The computer should be working on two things at the same time; making 4 oranges blocks so he could win, and trying to put oranges blocks on my way whenever I make three blocks, so I wonít win.
2. Whenever a player (me or the computer) fills 4 blocks with the same color to the side of each other horizontally, vertically, or even diagonally, the player wins.

When I first started it I thought it going to be easy, but things started to become more complicated then I thought, I know thereís Arrays involved in it, but I donít know how.
Please I need this ASAP, actually the deadline was suppose to be today, but I think I can extend it, Iím a freelancer you see.

Ghassan Yonis

08-01-2003, 06:54 PM
help any one, there must be someone who know something that could help, plesae..

08-01-2003, 07:20 PM
Here is a fully functioning game of noughts and crosses (from a certain flash magazine that i am not going to mention the name of) - it involves two users and can decide winners.

It should include a lot of what you need, the correct vars to decide winners and the vars to decide whos go it is.

This should be a big help for a game like yours. You can begin to see that you can change the vars to 'currentColor = "orange" and otherColor = "blue" etc, etc.

Try not to panic - break your task donw into stages:

1) get the users clicks to represent either orange or blue.
2) get it to decide winner (even if its a simple vertical line to start with)
3) build on that basic functionality - expand it peice by peice.

don't try and tackle everything at once, stay calm and break down the copde (theres not a lot there)

//OK - the fla is too big for some reason, i think it's their way of telling me i should not be sharing it, because as a swf its only 1kb - so if you want it, i can mail it to you

Actually sod it - heres your file, slightly modified - this should get things going for you:


08-01-2003, 07:44 PM
feck sorry, forgot the file - you can begin to see how things can be modified, you can use mulitdimensional arrays to 'hold' the grid for the game and then check to see if someone is a winner. I know you wanted to play against the computer, but that can be done afterwards, ontop of the fact that its beyond my thinking/ability at the moment.

08-02-2003, 04:25 PM
Thanx alot, I haven't seen the fla yet becuase I don't have flash here were I'm talking from, thanx again for repling and I hope this works. The main problem is to get the computer player to work on two tasks at the same time; making sequence of four orange blocks, and tring to cut the way on the humen player. if I don't got this by tommorow then it's over. Thanx again for repling man.:D