47 lines
1.3 KiB
Java
47 lines
1.3 KiB
Java
|
/**
|
||
|
* La classe <code>SameGame</code> est utilisée pour assembler HUD et Grid afin de former le jeu.
|
||
|
*
|
||
|
* @version 0.1
|
||
|
* @author Adil HAMMERSCHMIDT & Lucas GRANDJEAN
|
||
|
*/
|
||
|
|
||
|
import java.awt.BorderLayout;
|
||
|
import javax.swing.*;
|
||
|
|
||
|
public class SameGame extends JFrame {
|
||
|
|
||
|
private int tempScore = 0;
|
||
|
private HUD gameHUD = new HUD();
|
||
|
|
||
|
/**
|
||
|
* Constructeur de classe
|
||
|
*/
|
||
|
public SameGame() {
|
||
|
Grid gameGrid = new Grid(this.gameHUD);
|
||
|
this.add(BorderLayout.CENTER, gameGrid);
|
||
|
this.add(BorderLayout.NORTH, this.gameHUD);
|
||
|
this.pack();
|
||
|
this.setSize(800, 650);
|
||
|
this.setLocation(300, 300);
|
||
|
this.setResizable(false);
|
||
|
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||
|
this.setVisible(true);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* (Surchage) Constructeur de classe
|
||
|
* @param s Fichier texte de la Grid
|
||
|
*/
|
||
|
public SameGame(String s) {
|
||
|
Grid gameGrid = new Grid(s, this.gameHUD);
|
||
|
this.add(BorderLayout.CENTER, gameGrid);
|
||
|
this.add(BorderLayout.NORTH, this.gameHUD);
|
||
|
this.pack();
|
||
|
this.setSize(800, 650);
|
||
|
this.setLocation(300, 300);
|
||
|
this.setResizable(false);
|
||
|
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||
|
this.setVisible(true);
|
||
|
}
|
||
|
|
||
|
}
|