Two issues: (1) color box of current color should be inactive (or at least not count as a step when clicked); (2) a static array is preventing a clean reset.
I would be interested to see how you coded this. It is not simple code. How much help did you get for this? I created a working model of it and realized how involved it was. I only used Actor objects for the clickable boxes. I thought that having actors for the main grid would just make things more difficult to deal with.
Lol....Its my 1st time that i saw u(danpost), that u r interested in someone's else scenario(finally i got some info about u...i mean in which type of scenario u r interested in)
@katenech, ur efforts paid off! Needs to be appreciated!!
Its very hard to get a feedback from the most respected and helpful user in greenfoot
Hope 1 day, i also may get a feedback from any 1 of the respected user. And sry for poking my nose into ur discussion
@danpost
I propably would have used actors at a big cell size, given them a boolean field "reached" defaulted to false and use getNeighbours() on each of them once per click to check for new tiles of the same color next to them. However it is clear to see that that cannot be the case here because the main grid is not in the world grid.
I played through once and it seemed to work great! The second time, I found that it paints the whole field the same color after clicking just one of the bottom squares.
2021/2/26
2021/2/26
2021/2/26
2021/2/26
2021/2/26
2021/2/27
2021/3/28
2021/3/28
2021/3/28
2021/3/28
2021/3/28
2021/3/28
2021/3/28
2021/3/28
2021/3/28
2021/3/28
2021/3/28
2021/4/20
2021/4/21