Match Three Puzzle Algorithms

I am trying to write a game with three puzzle games, similar to the "call of Atlantis." The most important algorithm is to find out all the possible match options. Are there any open source projects that can be referenced? Or any keywords for the algorithm? I am trying to find a faster algorithm to calculate all the possibilities. Thank.

+3
source share
1 answer

To match 3 objects using a single swap, you already need 2 objects that are lined up correctly. First identify these pairs. Then there are only a few possibilities from which you can change the third object. Try coding these patterns.

( , ).

, .

+2

Source: https://habr.com/ru/post/1759046/


All Articles