📄 food.java
字号:
import java.util.*;import java.awt.*;import gaming.*;import java.lang.Object;public class Food extends DummyItem{ public Food(int x,int y) { super(x,y,Color.pink,0); //the normal food which color is pink it is a small dot } public Food(int x,int y, Color myColor,int shape) { super(x,y,Color.red,1);//the super food which color is red and it is a bigger dot } public int getX() { return x; } public int getY() { return y; } public Color getColor() { return this.color; } public int getShape() { return this.shape; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -