Three or more identical gems will disappear and score points. Accumulating a certain number of gems in the passage will result in failure. Reaching a certain score will level you up.
keyboard_arrow_up