12 mPuzzleCode = puzzleCode;
24 int result = mPuzzleCode;
29 ary[0] = (result % 11) + 1;
30 result = result - (ary[0] - 1);
32 for(
int i=1; i<4; i++){
33 if(i == 3 && result >= 11){
34 ary[i] = (result / 11) + 1;
36 ary[i] = ((result / 11) % 11) + 1;
37 result = (result / 11) - ((result / 11) % 11);
42 blockMap[
"Blue"] = ary[0];
43 blockMap[
"Yellow"] = ary[1];
44 blockMap[
"Red"] = ary[2];
45 blockMap[
"Black"] = ary[3];
60 result = blockMap[
"Black"];
64 result = blockMap[
"Red"];
68 result = blockMap[
"Yellow"];
72 result = blockMap[
"Blue"];
91 if(redNum > 0)blackNum++;
92 if(redNum > 5)blackNum+=2;
93 if(redNum > 10)blackNum++;
104 int blackNum=yellowNum;
106 if(yellowNum > 2)blackNum++;
107 if(yellowNum > 3)blackNum++;
108 if(yellowNum > 10)blackNum++;
119 int blackNum=blueNum;
121 if(blueNum > 1)blackNum++;
122 if(blueNum > 2)blackNum++;
123 if(blueNum > 6)blackNum++;
124 if(blueNum > 7)blackNum++;
int blueToBlackPosition(int blueNum)
int redToBlackPosition(int redNum)
int getPosition(BlockColor color)
int yellowToBlackPosition(int yellowNum)
void resolvePositionCode()