Using ArrayList<int>

You are effectively doing a flood fill and there are many good algorithms out there that can do this efficiently. You might want to look at them.

well I know myself too well and If I saw the algorithms once, I would try to immitate them while trying even though it isn’t going anywhere. If you saw my take on the fractal tree problem I used some logic and creativity to do it, while learning a lot about programming especially about ArrayLists which usually caused headaches for me ever since I heard of them.

I know you meant to check them out after I finished this but yeah.

Oh and btw I got the idea after designing a pathfinder and seeing the floodIt game

I don’t know how much you care but the pathfinder relied on what I call “String instructions”. Basically everytime I move (by checking the 4 squares around it) I add a number from 0 to 4 depending on which way I used (up = 0, right = 1, down = 2, left = 3). This way you can get the shortest path to all the squares in a reasonably small area which could be good for a labyrinth solver I was planning to create at the time.

(I don’t know if any algorithms work the way I used)



I just felt like bragging while being happy I finally know how to use the ArrayLists, even though its like a toddler bragging to an adult about how he managed to get his pants on without any help.