HTML and CSS Reference
The quest is composited by a sequence of paterns. A straighforward approach is to store
the patern sequence in an array. Then, all we need to do is compare whether the player's
sequence is exactly the same as the given one.
Sounds good, but it fails in one case. In our paterns, there are some paterns that don't
overlap with the others. Take the following patern shown in the screenshot as an example:
The trapezoids to the left and right fit together without overlapping. We require the player
to match the patern visually so the sequence of these two selecions does not change the
effect, as shown in the following screenshot:
However, in the following patern, the circle does overlap with the triangle:
Therefore, a simple sequence array does not work. Let's improve how we store the paterns
in an array. How about using a 2-dimensional array?