向左移动
void movea(){ if(y>0){ if(screen[x][y-1]==1){ return; }else if(screen[x][y-1]==4){ screen[x][y-1]+=3; screen[x][y]-=3; y--; } else if(screen[x][y-1]==0){ screen[x][y-1]+=3; screen[x][y]-=3; y--; }else if(screen[x][y-1]==2||screen[x][y-1]==6){ if(screen[x][y-2]==0){ screen[x][y-2]+=2; screen[x][y-1]+=1; screen[x][y]-=3; y--; }else if(screen[x][y-2]==1){ return; }else if(screen[x][y-2]==2){ return; }else if(screen[x][y-2]=4){ screen[x][y-2]+=2; screen[x][y-1]+=1; screen[x][y]-=3; y--; } } } }C语言实现推箱子游戏完整代码 (5)
内容版权声明:除非注明,否则皆为本站原创文章。