河滩小螃蟹部分代码
来源:互联网 发布:守望先锋生涯数据查询 编辑:程序博客网 时间:2024/04/26 12:52
public class Crab{
private String name = "匿名";
private int x = 0;
private int y = 0;
private int width = 30;
private int height = 25;
private int xSpeed = 1;
private int ySpeed = 1;
Crab(){}
Crab(String name, int x, int y, int xSpeed, int ySpeed){
this.name = name;
this.x = x;
this.y = y;
this.xSpeed = xSpeed;
this.ySpeed = ySpeed;
}
public void move(){
this.x = this.x + 1;
this.y = this.y + 1;
}
public void move(int xSpeed, int ySpeed){
this.x = this.x + xSpeed;
this.y = this.y + ySpeed;
}
public void eat(){}
public void turn(int angle){
if(isAtWorldEdge()){
}
}
public boolean isAtWorldEdge(World world){
return true;
}
}
private String name = "匿名";
private int x = 0;
private int y = 0;
private int width = 30;
private int height = 25;
private int xSpeed = 1;
private int ySpeed = 1;
Crab(){}
Crab(String name, int x, int y, int xSpeed, int ySpeed){
this.name = name;
this.x = x;
this.y = y;
this.xSpeed = xSpeed;
this.ySpeed = ySpeed;
}
public void move(){
this.x = this.x + 1;
this.y = this.y + 1;
}
public void move(int xSpeed, int ySpeed){
this.x = this.x + xSpeed;
this.y = this.y + ySpeed;
}
public void eat(){}
public void turn(int angle){
if(isAtWorldEdge()){
}
}
public boolean isAtWorldEdge(World world){
return true;
}
}
0 0
- 河滩小螃蟹部分代码
- 螃蟹
- 部分小代码
- 如何蒸螃蟹?教你蒸螃蟹3个小窍门
- 听说中秋你要吃螃蟹?这有一款自动剥螃蟹机器人 ‖ 小视频
- blog旁常用小日历代码部分
- Android常用部分小功能代码
- Android常用部分小功能代码
- Cocos2d-x 3.2 大富翁游戏项目开发-第二十部分 螃蟹挡路(code)
- 螃蟹敢死队
- 螃蟹洼
- 螃蟹 虾爬
- 小程序开发系列之基础部分-代码结构
- 代码 部分
- 部分代码
- 让我们用螃蟹告别
- 吃螃蟹全攻略
- 那只螃蟹
- 服务跳转、客户跳转
- 类的继承
- 听说王铮亮要给主席送专辑?
- grade 3 class 2, half 1
- 秒杀项目的注意事项
- 河滩小螃蟹部分代码
- 关于构造函数没有返回值的问题
- pu ke didi
- 设计模式(12) 代理模式(PROXY)
- double badminton match
- VC和GCC静态变量析构顺序不同
- 关于fstream修改文件内容的操作
- 类 的继承2
- 解bug的心得