From 1f87a1df8ad1cbccb052766b4a82c8163e208795 Mon Sep 17 00:00:00 2001 From: Luis Rodrigues Date: Thu, 2 Apr 2026 10:06:03 +0100 Subject: [PATCH] =?UTF-8?q?remover=20codigo=20de=20fun=C3=A7=C3=A3o=20n?= =?UTF-8?q?=C3=A3o=20usada=20('criarTabuleiro()'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/gui.py | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/modules/gui.py b/modules/gui.py index 90642eb..387f9e0 100644 --- a/modules/gui.py +++ b/modules/gui.py @@ -98,33 +98,6 @@ def devolveCor(agente: Agente) -> tuple[int, int, int, int]: return (0, 0, 0, 0) -def criarTabuleiro( - surface: pg.Surface, - mapa: Mapa, -) -> None: - dimensao_tabuleiro: tuple[int, int] = mapa.dimensao - dimensoes_surface_principal: tuple[int, int] = surface.get_size() - max_altura: int = int((dimensoes_surface_principal[1] - 20) / dimensao_tabuleiro[0]) - tamanho_quadrado: int = max_altura - cor_quadrado: tuple[int, int, int, int] - - for pos_y in range(0, dimensao_tabuleiro[0]): - for pos_x in range(0, dimensao_tabuleiro[1]): - agente: Agente | None = mapa.posicao((pos_x, pos_y)) - cor_quadrado = devolveCor(agente) - pg.draw.rect( - surface, - cor_quadrado, - [ - 10 + (tamanho_quadrado * pos_x), - 10 + (tamanho_quadrado * pos_y), - tamanho_quadrado, - tamanho_quadrado, - ], - 0, - ) - - def criarMapa(janela_app: pg.Surface, frame: Frame, mapa: Mapa) -> None: lado: int = (frame.tamanho[1] - (10 * 2)) // mapa.dimensao[0] for pos_y in range(0, mapa.dimensao[1]):