55
66
77class Shape (object ):
8- def __init__ (self , position : Vector2 | tuple [int , int ]= Vector2 (0 , 0 ), color : pygame .Color | tuple [int , int , int ]= (0 , 0 , 0 )) -> None :
8+ def __init__ (self , position : tuple [int , int ] | Vector2 = Vector2 (0 , 0 ), color : pygame .Color | tuple [int , int , int ]= (0 , 0 , 0 )) -> None :
99 """
1010 Parameters
1111 ----------
12- position : Vector2 | tuple[int, int]
12+ position : tuple[int, int] | Vector2
1313 The position of the shape. Default is (0, 0)
1414 color : pygame.Color | tuple[int, int, int]
1515 The position of the shape. Default is black or (0, 0, 0)
@@ -31,14 +31,14 @@ def draw(self, surface: pygame.Surface):
3131
3232
3333class Square (Shape ):
34- def __init__ (self , position : Vector2 | tuple [int , int ]= Vector2 (0 , 0 ), size : Vector2 | tuple [int , int ]= Vector2 (100 , 100 ),
34+ def __init__ (self , position : tuple [int , int ] | Vector2 = Vector2 (0 , 0 ), size : tuple [int , int ] | Vector2 = Vector2 (100 , 100 ),
3535 color : pygame .Color | tuple [int , int , int ]= (0 , 0 , 0 )) -> None :
3636 """
3737 Parameters
3838 ----------
39- position : Vector2 | tuple[int, int]
39+ position : tuple[int, int] | Vector2
4040 The position of the shape. Default is (0, 0)
41- size : Vector2 | tuple[int, int]
41+ size : tuple[int, int] | Vector2
4242 The size of the square. Default is (100, 100)
4343 color : pygame.Color | tuple[int, int, int]
4444 The position of the shape. Default is black or (0, 0, 0)
@@ -90,11 +90,11 @@ def draw(self, surface: pygame.Surface):
9090
9191
9292class Circle (Shape ):
93- def __init__ (self , position : Vector2 = Vector2 (0 , 0 ), radius : int = 10 , color : pygame .Color | tuple [int , int , int ]= (0 , 0 , 0 )) -> None :
93+ def __init__ (self , position : tuple [ int , int ] | Vector2 = Vector2 (0 , 0 ), radius : int = 10 , color : pygame .Color | tuple [int , int , int ]= (0 , 0 , 0 )) -> None :
9494 """
9595 Parameters
9696 ----------
97- position : Vector2 | tuple[int, int]
97+ position :tuple[int, int] | Vector2
9898 The position of the shape. Default is (0, 0)
9999 radius : int
100100 The radius of the circle. Default is 10
0 commit comments