/// <summary> /// Method converts game settings to string. /// </summary> /// <returns>string</returns> public String ExportSettingsToString() { String result = ""; result += TranslateData.TrasnlateNumberToChar(boardSize) + "."; result += TranslateData.TrasnlateNumberToChar(numberOfLayers) + "."; result += TranslateData.TrasnlateNumberToChar(numberOfFieldsToAdd) + "."; result += TranslateData.TrasnlateNumberToChar((int)Math.Log((int)targetValueOfTheField, 2)) + "."; if (ifTheGameIsOver == false) { result += TranslateData.TrasnlateNumberToChar(0) + "."; } else { result += TranslateData.TrasnlateNumberToChar(1) + "."; } return(result); }
/// <summary> /// Method converts field values and highest field value to string /// </summary> /// <returns></returns> public String ExportGameBoardModelToString() { String result = ""; result += TranslateData.TrasnlateNumberToChar((int)Math.Log((int)highestValue, 2)) + "."; for (int z = 0; z < numberOfLayers; z++) { for (int x = 0; x < boardSize; x++) { for (int y = 0; y < boardSize; y++) { result += TranslateData.TrasnlateNumberToChar((int)Math.Log((int)fields[z][x, y], 2)); } } } result += "."; return(result); }