版本比较
easyx贪吃蛇2.0
正文
增加 5 行删除 5 行
31 行未改动3233343536363738394043 行未改动8485868788888990919225 行未改动11811912012112212212312412512612712812913013113213213313413513616 行未改动15315415515615715715831 行未改动 } setlinestyle(PS_SOLID,1); setlinecolor(WHITE); BeginBatchDraw();
for(int i=0;i<=30;i++){ line(50,i*20+50,650,i*20+50); } for(int i=0;i<=30;i++){43 行未改动 if(mp[ywx][ywy]==1){ EndBatchDraw(); cleardevice(); settextstyle(100,0,"楷体"); outtextxy(350-textwidth("GAME OVER")/2,350-textheight("GAME OVER")/2,"GAME OVER"); outtextxy(350-textwidth("GAME OVER")/2,350-textheight("GAME OVER")/2,"GAME OVER"); Sleep(3000); return 0; } ywx=start.first+fx_s[fx[start.first][start.second]];25 行未改动 } if(start.second>30){ start.second=1; } mp[start.first][start.second]=1; mp[start.first][start.second]=1; if(start.first==ax&&start.second==ay){ flog=0; }else{ mp[end.first][end.second]=0; x=end.first,y=end.second; end.first=end.first+fx_s[fx[x][y]]; end.second=end.second+fx_s[fx[x][y]+4]; if(end.first<1){ end.first=30; } } if(end.first>30){ end.first=1; } if(end.second<1){16 行未改动 return true; } return false;}//原创:cyx1234 //原创:cyx1234```