Aumentamos bloque para ayudar a bloqueo enemigos

This commit is contained in:
luisgulo 2026-10-04 16:32:56 +02:00
parent 4c697de140
commit df4fec3f16
3 changed files with 19 additions and 6 deletions

View File

@ -644,14 +644,27 @@ class Game:
)
self.spares.append(spare)
# GENERACIÓN INCREMENTADA DE BLOQUES
for y in range(10, GRID_SIZE_Y - 12):
if y % 6 == 0:
lane = (y * 3) % GRID_SIZE_X
if (y // 6) % 2 == 0:
self.entities.append(WhiteBlock(lane, y))
# Genera bloques cada 2 filas en lugar de cada 3 o 6
if y % 3 == 0:
lane1 = (y * 3) % GRID_SIZE_X
lane2 = (y * 5 + 2) % GRID_SIZE_X
# Bloque blanco o morado alternado
if (y // 2) % 2 == 0:
self.entities.append(WhiteBlock(lane1, y))
else:
self.entities.append(PurpleBlock(lane, y))
self.entities.append(PurpleBlock(lane1, y))
# Añade un segundo bloque en la misma fila para crear barreras más tupidas
if lane1 != lane2:
if y % 4 == 0:
self.entities.append(WhiteBlock(lane2, y))
else:
self.entities.append(PurpleBlock(lane2, y))
# Configuración de Enemigos
if y % 14 == 0:
self.entities.append(Enemy(2.0, y, destructible=True))
@ -738,7 +751,7 @@ class Game:
if self.lives <= 0:
self.screen.fill((0, 0, 0))
msg = self.font.render(
"GAME OVER - Press R to Restart", True, (255, 50, 50)
"GAME OVER - Pulsa R para Reiniciar", True, (255, 50, 50)
)
self.screen.blit(
msg, (SCREEN_WIDTH // 2 - 150, SCREEN_HEIGHT // 2)

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB