ThE_oMiKrOn_CaT #1 thank GDK but this only takes the case of the block being in a row, the block could be in the form of a square, or an L shape or a verical bar of four and so on...