Exemple #1
0
 def draw_next_shape(self, screen):
     next_shape = Shape(self.game.get_next_shape())
     for i in range(0, 2):
         next_shape.set_position(Translation().in_direction(next_shape.get_points(), DOWN))
     pieces=[]
     color = TILE_COLORS[next_shape.get_tile()]
     for point in next_shape.get_points():
         coords = ScreenCoords(row=point.row, col=point.col, tile_width=(screen.get_height()/20))
         pieces.append(DrawableFactory().create_piece(coords, color, next_shape.get_tile().is_empty()))
         
     Center(start=screen.get_height()/2, end=screen.get_width()).pieces_along_x(pieces)
     for piece in pieces:
         piece.draw(screen)