Commit 3e6ad96b by BellCodeEditor

auto save

parent 8a3f6721
Showing with 21 additions and 0 deletions
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
quit()
elif event.type == locals.KEYDOWN:
if event.key == locals.K_LEFT:
active_block.move(-1,0,block)
elif event.key == locals.K_RIGHT:
active_block.move(1,0,block)
elif event.key == locals.K_DOWN:
active_block.move(0,1,block)
elif event.key == locals.K_UP:
active_block.rotate(board)
if not active_block.move(0,1,block):
for i in range(len(active_block.shape)):
if active_block.shape[i][j]:
board[active_block.y+i][active_block.x+j]=active_block.color
active_block=Block()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment