def matter(cls, m: Matter) -> Matter: new_matter = m.deepcopy() if new_matter.is_filled_rectangle(): if new_matter.is_square(): new_matter.a = 2 else: new_matter.a = 1 else: if m.a is not None: new_matter.a = 0 else: new_matter.a = None return new_matter
def set_color_add(m: Matter, color_add: int) -> Matter: new_matter: Matter = m.deepcopy() new_matter.color_add = color_add return new_matter
def matter_x(cls, m_x: Matter) -> Matter: return m_x.deepcopy()
def matter(cls, m: Matter) -> Matter: m: Matter new_matter = m.deepcopy() new_matter.a = count_hole(m.values, m.background_color) return new_matter