Nur die besten Spiele ;3
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
783 B

  1. package Minesweeper;
  2. import javax.swing.JFrame;
  3. import javax.swing.JPanel;
  4. public class MinesweeperGame extends JPanel {
  5. private static final long serialVersionUID = 1L;
  6. public static final int WIDTH = 600, HEIGTH = 600;
  7. public Playfield playfield;
  8. public TimerLable tl;
  9. public MinesweeperGame(int _playfieldSize, int _bombAmount) {
  10. this.setSize(WIDTH, HEIGTH);
  11. setLayout(null);
  12. playfield = new Playfield(this, _playfieldSize, _bombAmount);
  13. tl = new TimerLable();
  14. tl.setBounds((WIDTH / 2 - 5), HEIGTH / 2 - 240, 20, 20);
  15. add(tl);
  16. tl.start();
  17. }
  18. public static void main(String[] args) {
  19. JFrame f = new JFrame();
  20. MinesweeperGame MsG = new MinesweeperGame(8, 10);
  21. f.add(MsG);
  22. f.setSize(WIDTH, HEIGTH);
  23. f.setLayout(null);
  24. f.setVisible(true);
  25. }
  26. }