feat: create class for well
This commit is contained in:
5
main.py
5
main.py
@@ -1,12 +1,14 @@
|
||||
'''
|
||||
Tetris 101:
|
||||
https://strategywiki.org/wiki/Tetris/Getting_Started
|
||||
https://tetris.com/play-tetris
|
||||
'''
|
||||
|
||||
import pygame
|
||||
|
||||
from util.ConfigurationManager import ConfigurationManager
|
||||
from util.PieceGenerator import PieceGenerator
|
||||
from entity.Well import Well
|
||||
|
||||
def draw(screen, objects):
|
||||
# draw window bg
|
||||
@@ -39,6 +41,7 @@ def main():
|
||||
pygame.display.set_icon(loaded_icon)
|
||||
|
||||
pieces = []
|
||||
well = Well((280, 80))
|
||||
x = 50
|
||||
y = 50
|
||||
for _ in range(6):
|
||||
@@ -65,7 +68,7 @@ def main():
|
||||
if event.key == pygame.K_DOWN:
|
||||
[piece.move((0, tile_size)) for piece in pieces]
|
||||
|
||||
draw(screen, pieces)
|
||||
draw(screen, pieces + [well])
|
||||
|
||||
pygame.quit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user