private void submitButton_Click(object sender, EventArgs e) { if (game.IsPuzzleValidForSaving()) { game.targetTime = decimal.ToInt32(targetTimeInput.Value); game.baseScore = decimal.ToInt32(baseScoreInput.Value); controller.SaveAndQuit(inputText.Text, false); } }
public void ExportSudoku() { GameSettings settings = GetGameSettings(); if (!game.IsPuzzleValidForSaving()) { var ChoseNo = !editor.GetBoolInput("Current sudoku is invalid, are you sure you want to save", "Warning"); if (ChoseNo) { return; } } string filePath = editor.GetSaveFilePath(); string gameSettings = game.WriteJsonSettings(GetGameSettings()); string csvGame = game.ToCSVString(game.numbersArray); SaveFile(filePath, gameSettings, csvGame); }