hi all how to implement code for displaying images in 3 rows with 3 colors in jumbling order but each row must be have 10 images, once they place one color images in one row that row clear. if they clear once it has to move next level and we display 4 rows with 4 colors it keeps incremented up-to 6 rows. so help me to solve the problem
Share
Maybe split the problem into several parts.
I would first create an array containing the images (location of the images) and then iterate through the array with a for-in loop. Within that loop you have a variable that stores the last right boarder of the last created image (x-position). This position is the starting position for the next image. For 3 rows you will need to nest this loop into another one that builds the rows (changing the y-position).
If you got that working, it shouldn’t be too hard to apply the rules you describe above, which I admit I havn’t completely understood.