A Chain-Detection Algorithm for Two-Dimensional Grids | Read Paper on Bytez