A better way to check each row and column matches of 1-Dimensional tiles (Java)

The current algorithm is such a mess and it's not giving the right answers.

It supposed to check for each type of candy, for at least 3 consecutive candy type it will "break".

May I know a simple or at least a source algorithm for that purpose.

You may see my code on my GitHub here and the part of my algorithm here.

Thanks in advance :D

Tagged:

Answers

Sign In or Register to comment.