Dec-25-2021, 02:38 AM
i try to make a break block type of game but the button line doesnt move left or right, i ve been trying for 2 days this is what i made so far
import pygame
from pygame.locals import *
pygame.init()
pygame.display.init()
Red = (255,0,0)
black = (0,0,0)
yellow = (255,255,0)
aqua = (0,255,255)
w_h = [720, 720]
LEFT = 'left'
screen = pygame.display.set_mode((w_h))
pygame.display.set_caption("tetris clone")
screen.fill(Red)
pygame.draw.rect(screen, black, [25, 20, 100, 25])
pygame.draw.rect(screen, black, [245, 700, 150, 25])
draw = pygame.draw.circle(screen, yellow, (300, 400), 15, 0)
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
if event.type == pygame.K_LEFT:
move = event.pos
LEFT
pygame.display.flip()also i how do i make the ball fall and when the ball hits the button line it will bounce at the walls?thanks!
