Tengo un problema estoy haciendo un juego de memory de las cartas y solo puedo clickear con el mause izquierdo intente aumentarle para el derecho pero me sale
indentation error expected an intented block
Mi codigo es este
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
if event.type == pygame.MOUSEBUTTONDOWN:
if pygame.mouse.get_pressed()==(1,0,0):
posX = pygame.mouse.get_pos()[0]//100
posY = pygame.mouse.get_pos()[1]//200
taken = memo.taken_cards(posX,posY,taken_pos)
if taken == False:
if card1 == False and card2 == False:
card1_pos = [posX,posY]
card1 = True
elif card1 == True and card2 == False:
card2_pos = [posX,posY]
card2 = True
for event in pygame.event.get():
if event.type == pygame.MOUSEBUTTONUP:
if pygame.mouse.get_pressed()==(1,0,0):
posX = pygame.mouse.get_pos()[0]//100
posY = pygame.mouse.get_pos()[1]//200
taken = memo.taken_cards(posX,posY,taken_pos)
if taken == False:
if card1 == False and card2 == False:
card1_pos = [posX,posY]
card1 = True
elif card1 == True and card2 == False:
card2_pos = [posX,posY]
card2 = True
El codigo en el que me base originalmente es el siguiente:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
if event.type == pygame.MOUSEBUTTONDOWN:
if pygame.mouse.get_pressed()==(1,0,0):
posX = pygame.mouse.get_pos()[0]//100
posY = pygame.mouse.get_pos()[1]//200
taken = memo.taken_cards(posX,posY,taken_pos)
if taken == False:
if card1 == False and card2 == False:
card1_pos = [posX,posY]
card1 = True
elif card1 == True and card2 == False:
card2_pos = [posX,posY]
card2 = True