Files
PyGame-Tetris/dropnext.py
2025-04-21 20:33:36 +02:00

15 lines
512 B
Python

import pygame
class DropNext():
def __init__(self, width, height):
self.dropnext = pygame.Surface((width, height))
self.width = width
self.height = height
self.dropnext.fill((0, 0, 0)) # Fill with black
def draw(self, screen, tile_size):
screen.blit(self.dropnext, (tile_size * 15, tile_size * 2))
def draw_block(self, brick):
self.dropnext.blit(brick, ((self.width - brick.get_width()) / 2, (self.height - brick.get_height()) / 2))