728x90 반응형 23288 주사위굴리기21 2022-04-28-23288-주사위굴리기2 01.주사위 이동하기 void moveCube(int dir) { if (dir == 0) { int copy = cube[4]; cube[4] = cube[3]; cube[3] = cube[2]; cube[2] = cube[6]; cube[6] = copy; } else if (dir == 1) { int copy = cube[1]; cube[1] = cube[6]; cube[6] = cube[5]; cube[5] = cube[3]; cube[3] = copy; } else if (dir == 2) { int copy = cube[2]; cube[2] = cube[3]; cube[3] = cube[4]; cube[4] = cube[6]; cube[6] = copy; } else if (dir == 3).. 2022. 4. 28. 이전 1 다음 728x90 반응형