⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 game.java

📁 扫雷 程序 是我学JAVA的时候编的 希望大家 不嫌弃 不过 喜欢的 尽管拿走
💻 JAVA
字号:

import java.util.Timer;
import javax.swing.*;

public class Game {
	public static final int BTNSIZE = 17;	//mine size
	public static final int SPACE = 0;		//space between two button
	public static int boardSize = 40;		
	public static int mineNum = 10;
	public int winSize = 0;
	private Board board;
	private JLabel numLabel;
	
	public Game(){
		board = new Board();
		board.setParent(this);
	}
	public void setNumberLabel(JLabel jl){
		numLabel = jl;
	}
	public JLabel getNumberLabel(){
		return numLabel;
	}
	public void start(){
		board.initBoard();
	}
	public void end(){}
	
	public Board getBoard(){
		return this.board;
	}
	public int getWindowSize(){
		return boardSize*BTNSIZE+(boardSize+1)*SPACE+10;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -