Exemplo n.º 1
0
 def draw(self, pygame, screen):
     for i in range(len(self.matrix) - 1):
         for j in range(len(self.matrix[i]) - 1):
             if self.matrix[i][j] == 'B':
                 pygame.draw.rect(screen, (0, 0, 255), [(constants.SIZE * i), (constants.SIZE * j), constants.SIZE, constants.SIZE], 2)
             elif self.matrix[i][j] == 'C':
                 pygame.draw.ellipse(screen, (255, 0, 255), [(constants.SIZE * i) + 9, (constants.SIZE * j) + 9, constants.SIZE - (2*9), constants.SIZE - (2*9)])
             elif self.matrix[i][j] == 'D':
                 pygame.draw.ellipse(screen, (255, 255, 0), [(constants.SIZE * i) + 7, (constants.SIZE * j) + 7, constants.SIZE - (2*7), constants.SIZE - (2*7)])
     for drawable in self.players:
         drawable.draw(pygame, screen)
Exemplo n.º 2
0
 def draw(self, pygame, screen):
     for drawable in self.units:
         drawable.draw(pygame, screen)
Exemplo n.º 3
0
 def draw(self, pygame, screen):
     for drawable in self.units:
         drawable.draw(pygame, screen)