I created this class so I could work with better
class Block:
def __init__(self, top, left):
self.Rect = pygame.Rect((top,left),(10,10))
Then I wanted to create a simple function that clips a rect like so
def clip(rect_obj):
return pygame.Rect.clip(rect_obj)
But when I pass the rect into my function I get the error in the headline. I even printed the type
my_block = Block()
print(type(my_block.Rect)) --> <Class Pygame.Rect>
my_rect = clip(my_block.Rect) --> TypeError: Argument must be a rect style Object
I want to know if there is a difference between a Rect Style Object and a Rect Object because I'm so confused. Also would drawing rects on a screen be the best way to layout a tic tac toe GUI or is it simpler to draw lines.