From 556ac8a3b3d5b55f76f6b22801bab0dc72376694 Mon Sep 17 00:00:00 2001 From: Luis Rodrigues Date: Fri, 3 Apr 2026 00:37:23 +0100 Subject: [PATCH] limitar tamanho do mapa a 128x128 --- modules/gui.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/gui.py b/modules/gui.py index 4266c0d..b8cb28d 100644 --- a/modules/gui.py +++ b/modules/gui.py @@ -219,6 +219,9 @@ def main(mapa: Mapa | None, tamanho_mapa: tuple[int, int]): # mudar mapa com 'c' (change) if event.key == pg.K_c: novo_tamanho = int(input("tamanho do mapa: ")) + if novo_tamanho > 128: + print("limite de tamanho é de 128") + novo_tamanho = 128 tamanho_mapa = (novo_tamanho, novo_tamanho) mapa = Mapa(tamanho_mapa) popularMapa(mapa)