资源简介
java扫雷源代码+扫雷素材
代码片段和文件信息
package com.xynu.mine;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.Toolkit;
public class Bomb {
private int x;
private int y;
private int what;
private int hide = 0;
private int w = 19;
private int h = 19;
private MineClient mc;
private Toolkit tk = Toolkit.getDefaultToolkit();
private Image bomb = tk.getImage(“Image/bomb.jpg“);
private Image bomb0 = tk.getImage(“Image/bomb0.jpg“);
private Image zeroBomb = tk.getImage(“Image/0.jpg“);
private Image oneBomb = tk.getImage(“Image/1.jpg“);
private Image twoBomb = tk.getImage(“Image/2.jpg“);
private Image threeBomb = tk.getImage(“Image/3.jpg“);
private Image fourBomb = tk.getImage(“Image/4.jpg“);
private Image fiveBomb = tk.getImage(“Image/5.jpg“);
private Image sixBomb = tk.getImage(“Image/6.jpg“);
private Image severnBomb = tk.getImage(“Image/7.jpg“);
private Image eightBomb = tk.getImage(“Image/8.jpg“);
private Image flag = tk.getImage(“Image/flag.jpg“);
private Image flag2 = tk.getImage(“Image/flag2.jpg“);
private Image bg = tk.getImage(“Image/s.jpg“);
public Bomb() {
super();
// TODO Auto-generated constructor stub
}
public Bomb(int x int y int what MineClient mc) {
super();
this.x = x;
this.y = y;
this.what = what;
this.mc = mc;
}
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public int getY() {
return y;
}
public void setY(int y) {
this.y = y;
}
public int getWhat() {
return what;
}
public void setWhat(int what) {
this.what = what;
}
public int getHide() {
return hide;
}
public void setHide(int hide) {
this.hide = hide;
}
//画地雷 数字
public void draw(Graphics g) {
switch (what) {
case 0:
g.drawImage(zeroBomb x y w h mc);
break;
case 1:
g.drawImage(oneBomb x y w h mc);
break;
case 2:
g.drawImage(twoBomb x y w h mc);
break;
case 3:
g.drawImage(threeBomb x y w h mc);
break;
case 4:
g.drawImage(fourBomb x y w h mc);
break;
case 5:
g.drawImage(fiveBomb x y w h mc);
break;
case 6:
g.drawImage(sixBomb x y w h mc);
break;
case 7:
g.drawImage(severnBomb x y w h mc);
break;
case 8:
g.drawImage(eightBomb x y w h mc);
break;
case 9:
g.drawImage(bomb x y w h mc);
break;
case 10:
g.drawImage(bomb0 x y w h mc);
break;
case 11:
g.drawImage(flag x y w h mc);
break;
case 12:
g.drawImage(flag2 x y w h mc);
break;
case 13:
g.drawImage(bg x y w h mc);
break;
}
}
public Rectangle getRec() {
return new Rectangle(x y w h);
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 299 2016-08-06 20:45 Mine\.classpath
文件 380 2016-08-06 18:30 Mine\.project
文件 598 2016-08-06 20:45 Mine\.settings\org.eclipse.jdt.core.prefs
文件 3679 2016-08-08 09:29 Mine\bin\com\xynu\mine\Bomb.class
文件 748 2016-08-08 15:47 Mine\bin\com\xynu\mine\MineClient$1.class
文件 748 2016-08-08 15:47 Mine\bin\com\xynu\mine\MineClient$2.class
文件 748 2016-08-08 15:47 Mine\bin\com\xynu\mine\MineClient$3.class
文件 858 2016-08-08 15:47 Mine\bin\com\xynu\mine\MineClient$4.class
文件 3284 2016-08-08 15:47 Mine\bin\com\xynu\mine\MineClient$MyPanel.class
文件 1040 2016-08-08 15:47 Mine\bin\com\xynu\mine\MineClient$updateThread.class
文件 7004 2016-08-08 15:47 Mine\bin\com\xynu\mine\MineClient.class
文件 4923 2016-08-08 15:57 Mine\bin\com\xynu\mine\MyMouseListener.class
文件 136 2016-08-06 20:10 Mine\Image\0.jpg
文件 237 2016-08-06 20:10 Mine\Image\1.jpg
文件 434 2016-08-06 20:10 Mine\Image\2.jpg
文件 422 2016-08-06 20:10 Mine\Image\3.jpg
文件 331 2016-08-06 20:10 Mine\Image\4.jpg
文件 391 2016-08-06 20:10 Mine\Image\5.jpg
文件 320 2016-08-06 20:10 Mine\Image\6.jpg
文件 332 2016-08-06 20:10 Mine\Image\7.jpg
文件 407 2016-08-06 20:10 Mine\Image\8.jpg
文件 1058 2016-08-06 20:10 Mine\Image\bomb.jpg
文件 1002 2016-08-06 20:10 Mine\Image\bomb0.jpg
文件 1222 2016-08-06 20:10 Mine\Image\flag.jpg
文件 1066 2016-08-06 20:10 Mine\Image\flag2.jpg
文件 3664 2016-08-08 15:29 Mine\Image\icon.jpg
文件 144 2016-08-06 20:10 Mine\Image\s.jpg
文件 341044 2016-08-08 11:10 Mine\Image\win.jpg
文件 2783 2016-08-08 09:29 Mine\src\com\xynu\mine\Bomb.java
文件 6974 2016-08-08 15:47 Mine\src\com\xynu\mine\MineClient.java
............此处省略15个文件信息
- 上一篇:个人所得税计算器 java
- 下一篇:Blackjack游戏原代码
评论
共有 条评论