def get_end_pos(cls, start_pos, dimensions, left=False, up=False):
    """
    calculate the end position if were to build an array of items
    :param cls: Type
    :param start_pos: (int, int)
    :param dimensions: (int, int)
    :param left: bool: default builds rightward
    :param up: bool: default builds downward
    :return: (int, int)
    """
    dx = (dimensions[0] - 1) * cls.width
    if left: dx = -dx
    dy = (dimensions[1] -1 ) * cls.height
    if up: dy = -dy
    
    end_pos = start_pos[0] + dx, start_pos[1] + dy
    return end_pos