Chapter 3. L-shape Match
~~~~~~~~~~~~~~~~~~~~~
It's ultra simple to detect an L-shape matched pattern, we just need to define what 2D pattern we want in <Matcher>-><For each 2D pattern> event. Add the following codes:
It looks weird in editor because newline will not be shown in event list. Below is the detailed information for the 1st condition in Event#8:
We can see in the parameters dialog that the template defines a wildcard patter in an horizontal mirrored L-shape:
Event#9 ~ 10 defines the rest 3 rotated L-shape template patterns to make the detection complete. Push <F4> to run layout. Congratulations! Now you've finished your match-3 game core logic with only 11 events!
In next tutorial we will teach you how to really delete the matched chess, let floating chess drop down, and inser a new line.
Hope you'll like this tutorial, see you soon!
Tutorial part 3 is here