therealfog
07-17-2007, 02:44 PM
Hi everybody.
I need to code some stuff in AS for work. Its basically a very simple version of the game of life.
All i need help in is figuring out what the best way to move the game piece is.
It's going to be only one player and move around the board only once. If this was something like shoots and ladders it would be easy for me to write the code because each cell would have a number for it (a part of an array). My problem is that the game of life has alternate paths. If im at cell 20 it can split into 2 paths that would put me back on the main path later on (this happens about 2,3 times).
The board is set - nothing much is going to be dynamic. I figured i will store the X,Y of every cell and use AS tweening to move the piece the amount of times the dice roll (a loop that would run the amount of times the dice shows). My problem is defining the square numbers.
I could either use arrays or make each square an object but i'm not sure what would be best. If anyone has an idea please let me know
Thanx ahead.
I need to code some stuff in AS for work. Its basically a very simple version of the game of life.
All i need help in is figuring out what the best way to move the game piece is.
It's going to be only one player and move around the board only once. If this was something like shoots and ladders it would be easy for me to write the code because each cell would have a number for it (a part of an array). My problem is that the game of life has alternate paths. If im at cell 20 it can split into 2 paths that would put me back on the main path later on (this happens about 2,3 times).
The board is set - nothing much is going to be dynamic. I figured i will store the X,Y of every cell and use AS tweening to move the piece the amount of times the dice roll (a loop that would run the amount of times the dice shows). My problem is defining the square numbers.
I could either use arrays or make each square an object but i'm not sure what would be best. If anyone has an idea please let me know
Thanx ahead.