adds a random size block to the map

def add_block(self):
        """ adds a random size block to the map """
        row_max = self.grd.get_grid_height() - 15
        if row_max < 2:
            row_max = 2
        row = randint(0, row_max)
        
        col_max = self.grd.get_grid_width() - 10
        if col_max < 2:
            col_max = 2
        col = randint(0, col_max)
        
        direction = randint(1,19)-10
        if direction > 0:
            y_len = 10 * (math.floor(self.grd.get_grid_height() / 120) + 1)
            x_len = 1 * (math.floor(self.grd.get_grid_width() / 200) + 1)
        else:
            y_len = 1 * (math.floor(self.grd.get_grid_height() / 200) + 1)
            x_len = 10 * (math.floor(self.grd.get_grid_width() / 120) + 1)
        
        print("Adding block to ", row, col, direction)
        for r in range(row, row + y_len):
            for c in range(col, col + x_len):
                self.grd.set_tile(r,c,TERRAIN_BLOCKED)