package 贪吃蛇; public class food { int id; int x; int y; public food() { this((int)(80*Math.random()),(int)(80*Math.random())); } public food(int x,int y) { this((int)(1000*Math.random()),x,y); } //生成食物并不在蛇的身上 public food(int id,int x,int y) { this.id=id; this.x=x; this.y=y; } public dop checkfood(dop[] d) {//递归运算 dop dd=new dop(0,x,y); for(int n=0;n<d.length;n++) { if(d[n].getx()==x&&d[n].gety()==y) { x=(int) (80*Math.random());y=(int)(80*Math.random()); dd=checkfood((d)); } } return dd; } }

爱情戴罪的羔羊 LV7
2024年4月2日
微信网友_6798355699273728 LV1
2023年12月28日
kuknkk LV1
2023年12月27日
koichenchen LV1
2023年11月3日
2949957869 LV1
2023年10月31日
luo110012 LV9
2023年5月15日
微信网友_6268131861106688 LV5
2022年12月21日
总有人间一两风 LV8
2022年12月12日
1h2k3q LV1
2022年11月29日
微信网友_6190732568825856 LV1
2022年10月25日

13133117021 LV5
2024年12月23日
鲁一宇 LV5
2024年12月23日
hoictas LV2
2024年11月26日
luoyanglin LV2
2024年9月14日
wswsws123 LV1
2024年9月11日
鬼屋报道 LV3
2024年6月1日
lsglsg9 LV23
2024年5月23日
zattttt LV1
2024年5月15日
微信网友_6979151039729664 LV2
2024年5月5日
爱情戴罪的羔羊 LV7
2024年4月2日