Implemented snap figures to grid