void PuzzleCodeConverter::resolvePositionCode()

in str/apps/explorer/PuzzleCodeConverter.cpp [22:48]


void PuzzleCodeConverter::resolvePositionCode()
{
	int result = mPuzzleCode;
	
	int ary[4];
	
	//初期位置コードの解釈
	ary[0] = (result % 11) + 1;
	result = result - (ary[0] - 1);
	
	for(int i=1; i<4; i++){
		if(i == 3 && result >= 11){
			ary[i] = (result / 11) + 1;
		}else{
			ary[i] = ((result / 11) % 11) + 1;
			result = (result / 11) - ((result / 11) % 11);
		}
	}
	
	//
	blockMap["Blue"] = ary[0];
	blockMap["Yellow"] = ary[1];
	blockMap["Red"] = ary[2];
	blockMap["Black"] = ary[3];
	
	return;
}