Deprecation Warning: an integer is required (got type float). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
self.rect.center = (width / 2, height / 2)
self.rect.center = (int(width / 2), int(height / 2))
self.rect.center = (width // 2, height // 2)