def __init__(self, item:Item, location:tuple, width:int, height:int, color:tuple, fontName:str, speedInPxPerSec:float): GridSprite.__init__(self, item.position, pygame.Rect(location[0], location[1], width, height), speedInPxPerSec) self.item = item self.backgroundColor = color self.fontName = fontName self.fontColor = (0, 0, 0) if ColorChooser.isDarkColor(self.backgroundColor): self.fontColor = (255, 255, 255) self.image = self.createBlock(self.rect, color, fontName, item)