heres object.py (part 3): class Image(Object):
 r'''
 #### Image
 #### Parameters
 - `pos`: position of the image `[x, y]`
 - `size` : size of the image `[width, height]`
 - `image` : path to image file `str`
 #### Optional Arguments
 - `scale` : scale the image to the size `bool`
 - `components` : components to add in the object `[Component, ..]`
 - `styles` : Styles
 '''

 def \_\_init\_\_(
 self, 
 image: Path | str,
 pos: Pos | Iterable[Measure], 
 size: Size | Iterable[Measure],
 scale: bool = True,
 styles: Styles = Styles(),
 parent: "Object" = None,
 components: Iterable[Component] = [],
 \*\*\_styles: Dict[str, Any]
 ):
 if not parent:
 parent = get\_window()
 
 self.image = image
 self.scale = scale
 
 super().\_\_init\_\_(pos=pos, size=size, styles=styles, parent=parent, components=components, \*\*\_styles)
 try:
 self.image = pg.image.load(image)
 except:
 raise ValueError("Image not found:", image)

 if scale:
 self.image = pg.transform.scale(self.image, self.size)

 def draw(self):
 self.window.surface.blit(self.image, self.pos)

 def rotate(self, angle):
 self.image = pg.transform.rotate(self.image, angle)
 self.size = [self.image.get\_width(), self.image.get\_height()]

 def flip(self, x\_axis: bool = True, y\_axis: bool = False):
 self.image = pg.transform.flip(self.image, x\_axis, y\_axis)
 self.size = [self.image.get\_width(), self.image.get\_height()]

 def scale(self, new\_size: Size):
 self.image = pg.transform.scale(self.image, new\_size)
 self.size = [self.image.get\_width(), self.image.get\_height()]

class Circle(Object):
 r'''
 #### Circle
 #### Parameters
 - `pos`: position of the circle `[x, y]`
 - `radius`: radius of the circle `number`
 #### Styles
 - `color`: color of the circle `"white" or (R, G, B)`
 - `stroke`: stroke of the circle `int`
 - `margins`: margins of the circle `[top, right, bottom, left]`
 - `components` : components to add in the object `[Component, ..]`
 '''
 \_\_slots\_\_ = ("radius", )

 def \_\_init\_\_(
 self, 
 pos: Pos | Iterable[Measure],
 radius: Measure,
 styles: Styles = Styles(),
 parent: "Object" = None,
 components: Iterable[Component] = [],
 \*\*\_styles: Dict[str, Any]
 
 ):
 if not parent:
 parent = get\_window()
 
 self.radius = resolve\_measure(radius)

 super().\_\_init\_\_(pos=pos, size=Size(radius\*2), styles=styles, parent=parent, components=components, \*\*\_styles)

 def draw(self):
 pg.draw.circle(
 self.window.surface,
 self.styles.color,
 self.pos, 
 self.radius, 
 self.styles.stroke
 )

 def \_get\_collision\_box(self):
 center\_x, center\_y = self.pos
 radius = self.size[0]/2
 return (
 (center\_x - radius, center\_y - radius), # top-left
 (center\_x + radius, center\_y - radius), # top-right
 (center\_x - radius, center\_y + radius), # bottom-left
 (center\_x + radius, center\_y + radius) # bottom-right
 )

class Ellipse(Object):
 r'''
 #### Ellipse
 #### Parameters
 - `pos`: position of the Ellipse `[x, y]`
 - `size`: size of the Ellipse `[width, height]`
 - `components` : components to add in the object `[Component, ..]`
 #### Styles
 - `color`: color of the Ellipse `"white" or (R, G, B)`
 - `stroke`: stroke of the Ellipse `int`
 - `margins`: margins of the Ellipse `[top, right, bottom, left]`
 '''

 def draw(self):
 pg.draw.ellipse(
 self.window.surface,
 self.styles.color, 
 (\*self.pos, \*self.size), 
 self.styles.stroke
 )
여기 object.py (3부): class Image(Object): r''' #### 이미지 #### 파라미터 - pos`: 이미지 `[x, y]`의 위치 - size` : 이미지의 크기 `[너비, 높이]` - image` : 이미지 파일 경로 `str` #### 선택적 인수 - scale` : 이미지의 크기를 `bool`로 조정합니다. - 컴포넌트` : 객체에 추가할 컴포넌트 `[컴포넌트, ..]` - `styles` : 스타일 ''' def \_\_init\_\_( self,  image: 경로 | str, pos: Pos | Iterable[Measure],  size: 크기 | Iterable[측정값], scale: bool = True, styles: Styles = Styles(), parent: "Object" = None, 컴포넌트: Iterable[Component] = [], \*\*\_styles: Dict[str, Any] ): 부모가 아니라면 parent = get\_window()  self.image = 이미지 self.scale = scale  super().\_\_init\_\_(pos=pos, size=크기, styles=스타일, parent=부모, components=컴포넌트, \*\*\_styles) try: self.image = pg.image.load(image) 예외: raise ValueError("이미지를 찾을 수 없음:", image) if scale: self.image = pg.transform.scale(self.image, self.size) def draw(self): self.window.surface.blit(self.image, self.pos) def rotate(self, angle): self.image = pg.transform.rotate(self.image, angle) self.size = [self.image.get\_width(), self.image.get\_height()] def flip(self, x\_축: bool = True, y\_축: bool = False): self.image = pg.transform.flip(self.image, x\_축, y\_축) self.size = [self.image.get\_width(), self.image.get\_height()] def scale(self, new\_size: 크기): self.image = pg.transform.scale(self.image, new\_size) self.size = [self.image.get\_width(), self.image.get\_height()]클래스 Circle(Object): r''' #### Circle #### 파라미터 - pos`: 원 `[x, y]`의 위치 - radius`: 원의 반지름 `수` #### 스타일 - color`: 원의 색상 `"흰색" 또는 (R, G, B)` - 획`: 원의 획 `int` - 여백`: 원의 여백 `[위, 오른쪽, 아래, 왼쪽]` - component`: 객체에 추가할 컴포넌트 `[컴포넌트, ..]` ''' \_\_slots\_\_ = ("반지름", ) def \_\_init\_\_( self,  pos: Pos | Iterable[Measure], radius: Measure, styles: Styles = Styles(), parent: "Object" = None, 컴포넌트: Iterable[Component] = [], \*\*\_styles: Dict[str, Any]  ): 부모가 아니라면 parent = get\_window()  self.radius = resolve\_measure(radius) super().\_\_init\_\_(pos=pos, size=Size(radius\*2), styles=styles, parent=부모, components=components, \*\*\_styles) def draw(self): pg.draw.circle( self.window.surface, self.styles.color, self.pos,  self.radius,  self.styles.stroke ) def \_get\_collision\_box(self): center\_x, center\_y = self.pos radius = self.size[0]/2 반환 ( (center\_x - 반지름, center\_y - 반지름), # top-left (center\_x + 반지름, center\_y - 반지름), # 오른쪽 상단 (중심\_x - 반지름, 중심\_y + 반지름), # 왼쪽 하단 (중심\_x + 반지름, 중심\_y + 반지름) # 오른쪽 하단 )Ellipse(Object) 클래스 r''' #### Ellipse #### 파라미터 - pos`: 타원 `[x, y]`의 위치 - size`: 타원의 크기 `[너비, 높이]` - 컴포넌트`: 객체에 추가할 컴포넌트 `[컴포넌트, ..]` #### 스타일 - color`: 타원의 색상 `"흰색" 또는 (R, G, B)` - 스트로크`: 타원 `int`의 스트로크 - 여백`: 타원의 여백 `[위, 오른쪽, 아래, 왼쪽]` ''' def draw(self): pg.draw.ellipse( self.window.surface, self.styles.color,  (\*self.pos, \*self.size),  self.styles.stroke )