Rules of the game is very simple, you just sort to group same color into line by line(vertical or horizontal is accepted) by drag left, right, up, down row or colume.