From 79718ebd5aef9a50d224a6a613aae16b7a58202c Mon Sep 17 00:00:00 2001 From: Nathan DENIER <nathan.denier@etu.univ-nantes.fr> Date: Sun, 3 Dec 2023 17:01:10 +0000 Subject: [PATCH] commentaire javadoc --- src/App/App.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/App/App.java b/src/App/App.java index b4aa7c5..ffd6a81 100644 --- a/src/App/App.java +++ b/src/App/App.java @@ -1,21 +1,32 @@ package App; import javax.swing.JFrame; +/** + * La classe principale App contient la méthode main, qui démarre l'application Bomberman. + * Elle crée une fenêtre JFrame, initialise le panneau de jeu (GamePanel), et démarre le thread du jeu. + */ public class App { public static void main(String[] args){ + // Crée d'une nouvelle fenêtre JFrame JFrame window = new JFrame(); window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); window.setResizable(false); window.setTitle("Bomberman"); + // Initialise le panneau de jeu (GamePanel) GamePanel gamePanel = new GamePanel(); window.add(gamePanel); + // Ajuste la taille de la fenêtre pour s'adapter au panneau de jeu window.pack(); + // Centre la fenêtre sur l'écran window.setLocationRelativeTo(null); + + // Rend la fenêtre visible window.setVisible(true); + // Démarre le thread du jeu en appelant la méthode startGameThread() du panneau de jeu gamePanel.startGameThread(); } } -- GitLab