//第八关图片移动规律 private void EightPace(int iCurIndex, int iLastIndex) { int i; int j; SImageMess SSwap; int x = iCurIndex / 18 + 2; int y = iCurIndex % 18 + 2; if (iCurIndex / 18 != iLastIndex / 18 || iCurIndex < iLastIndex) { SSwap = SImage[iCurIndex]; for (i = iCurIndex; i % 18 - 1 >= 0; i--) { SImage[i].ImageNum = SImage[i - 1].ImageNum; } SImage[i].ImageNum = SSwap.ImageNum; SSwap = SImage[iLastIndex]; for (i = iLastIndex; i % 18 - 1 >= 0; i--) { SImage[i].ImageNum = SImage[i - 1].ImageNum; } SImage[i].ImageNum = SSwap.ImageNum; for (j = y; j - 1 >= 2; j--) { iMap[x, j] = iMap[x, j - 1]; } iMap[x, j] = 1; for (j = iLastIndex % 18 + 2; j - 1 >= 2; j--) { iMap[iLastIndex / 18 + 2, j] = iMap[iLastIndex / 18 + 2, j - 1]; } iMap[iLastIndex / 18 + 2, j] = 1; } else { SSwap = SImage[iLastIndex]; for (i = iLastIndex; i % 18 - 1 >= 0; i--) { SImage[i].ImageNum = SImage[i - 1].ImageNum; } SImage[i].ImageNum = SSwap.ImageNum; SSwap = SImage[iCurIndex]; for (i = iCurIndex; i % 18 - 1 >= 0; i--) { SImage[i].ImageNum = SImage[i - 1].ImageNum; } SImage[i].ImageNum = SSwap.ImageNum; for (j = iLastIndex % 18 + 2; j - 1 >= 2; j--) { iMap[iLastIndex / 18 + 2, j] = iMap[iLastIndex / 18 + 2, j - 1]; } iMap[iLastIndex / 18 + 2, j] = 1; for (j = y; j - 1 >= 2; j--) { iMap[x, j] = iMap[x, j - 1]; } iMap[x, j] = 1; } }