📄 bigbomb.java
字号:
import java.awt.*;
public class bigBomb{
private int xPos, yPos;
private int timeofbomb = 6;
public bigBomb(int a, int b){
xPos = a;
yPos = b;
}
public void draw(Graphics g){
g.setColor(Color.red);
g.fillOval(xPos-14, yPos-14, 28,28);
g.setColor(Color.orange);
g.fillOval(xPos-9, yPos-9, 18,18);
g.setColor(Color.yellow);
g.fillOval(xPos-6, yPos-6, 12, 12);
}
public void keepbombing(){
timeofbomb--;
xPos = xPos + (int)(Math.random()*8) - (int)(Math.random()*8);
yPos = yPos + (int)(Math.random()*8) - (int)(Math.random()*8);
}
public int BombTimeleft(){
return timeofbomb;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -