Match 3 remove from arraylist

I make a big effort to ask people to make their code more readable. It is not only about formatting your code in the forum. You need to properly tab your code, which you do, as well as following standard java practices. I mean, nobody forces you to do something as simple as proper upper/lower case formatting. Matters are even worse since you sue Block and block in your code which, from any other people reading your code, will require to learn the way you think. This is important. I do not want to learn how you do things. You are not making life any easier to any of the forum volunteers that spend their own free time to help YOU.

I went an extra mile in your code because, your design is not proper. I mean, your previous code is doing something that should not be done. Your class block is accessing the array containing your blocks. I couldn’t go any further because your code is hard to read, exactly what is inside your update() function. Instead of writing code, you should explain what you are trying to do while performing those checkings there, or add short concise comments to your code.

Related to the adding blocks function, my bad. This is my practice of making code more readable and I do it when I see repeated code.

Kf

2 Likes