bool CanBeMerged(BlockSet <IBlock> a, BlockSet <IBlock> b) { var lastLine = a.Last(); var firstLine = b.First(); return(Block.HasOverlap(lastLine, firstLine)); }