Squares Challenge

Collect all squares with given color and try to get longest chain length with same color. Sometimes you need to collect squares with different colors to make line with color you need to destroy.