rect = pygame.Rect(self.abs_x,self.abs_y, self.size * 2, self.size * 2) def update(self, screen): self.rect = pygame.draw.circle(screen, self.color, (self.abs_x, self.abs_y), self.size, self.thickness) CopyAnd here's our short code for the Cell class.# cell.py import ...
self.rect = pygame.Rect(90,90,rects[0][2],rects[0][3])deflocForStrips(self):diff = self.count %4#print "diff (",diff,") = self.count (",self.count,") % 4"#print "returned: ",self.count - diffreturnself.count - diffdefsetRect(self,leftX = default_left,topY = default_t...
pygame.display.set_caption('Pent') screen = pygame.display.set_mode((SCREEN_W, SCREEN_H)) clock = pygame.time.Clock()# Sprite groupsall_sprites = pygame.sprite.RenderPlain() board = Board(screen.get_rect().center) all_sprites.add(board)# White goes first for nowcurrent_player = WHITE...
Anyway, I'm in the process of remaking rock raiders in html5 as a way to examine the limitations of and expand upon an html5/javascript port of a game engine I wrote last year building off of pygame. I know that 98% of fan projects and remakes die off shortly after being started so...