文件名称:JAVA编程扫雷游戏
文件大小:75KB
文件格式:RAR
更新时间:2012-01-30 08:53:23
JAVA 扫雷 小游戏 源代码
JAVA编程的扫雷小游戏的源代码 import java.awt.event.*; import java.awt.*; import javax.swing.*; import java.util.*; import java.io.*; public class MineSquare extends JPanel implements MouseListener { int rows=10,cols=10,雷数=10; JButton buttonFace=null; Block block[][]; TimeCount time; CountMine count; String grade=null; RandomSetMine 随机布雷者; FindAroundMineNumber 确定周围雷数者; FindSafeArea 找出无雷连通区者; DetermineDigArea 成片挖开者; DetermineMineMarkIsRightOrWrong 确定雷标记是否正确者; FindAroundMineMarkNumber 确定周围雷标数目者; DecideWinner 判断是否胜利者; Record 记录对话框=null; public MineSquare(String grade,int mineNumber,int rows, int cols,JButton b,JDialog dialog) { this.grade=grade; this.rows=rows; this.cols=cols; 雷数=mineNumber; 判断是否胜利者=new DecideWinner(); 记录对话框=(Record)dialog; block=new Block[rows+1][cols+1]; buttonFace=b; time=new TimeCount(); count=new CountMine(雷数); count.textShowMine.setText(""+雷数); setLayout(new GridLayout(rows,cols));
【文件预览】:
扫雷(java)
----使用说明.CHM(49KB)
----www.cnzz.cn()
--------chap13()
www.pudn.com.txt