diff --git a/android/gradle.properties b/android/gradle.properties index eeed3ef5a3d04530f5624cce71b2a57976938aed..ed86f0f26922ea79f4d0c8e0e84f6d74259952bb 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -app.versionName=0.0.21 -app.versionCode=21 +app.versionName=0.0.22 +app.versionCode=22 diff --git a/fastlane/metadata/android/en-US/changelogs/22.txt b/fastlane/metadata/android/en-US/changelogs/22.txt new file mode 100644 index 0000000000000000000000000000000000000000..4bf712c02389e650c2f2bb19dc499c5fd5e616a3 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/22.txt @@ -0,0 +1 @@ +Remove debug, clean some code diff --git a/fastlane/metadata/android/fr-FR/changelogs/22.txt b/fastlane/metadata/android/fr-FR/changelogs/22.txt new file mode 100644 index 0000000000000000000000000000000000000000..2f1782334cc65676e7fc5a843205c36993acd297 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/22.txt @@ -0,0 +1 @@ +Suppression d'écritures de debug, nettoyage de code diff --git a/lib/provider/data.dart b/lib/provider/data.dart index 04df1862662810be67da5b6ad5556714f678a5a1..12b20407a98f4a307fc88e38b0157ea9ffc60041 100644 --- a/lib/provider/data.dart +++ b/lib/provider/data.dart @@ -77,11 +77,8 @@ class Data extends ChangeNotifier { void currentGuessSubmitWord() { if (_currentGuess.length == int.parse(_length)) { - print('check word: ' + _currentGuess); - if (_currentGuess != _word) { - print('wrong'); - } else { - print('ok found'); + if (_currentGuess == _word) { + print('Word found!'); _foundWord = true; } addGuess(_currentGuess); @@ -90,13 +87,11 @@ class Data extends ChangeNotifier { } void currentGuessSubmitWrongWord() { - print('Adding unknown word'); addGuess(_currentGuess); notifyListeners(); } void addGuess(String word) { - print('addGuess(' + word + ')'); _guesses.add(word); _currentGuess = ''; } @@ -108,7 +103,6 @@ class Data extends ChangeNotifier { void addFoundLetter(String letter, int i) { _foundLetters = _foundLetters.substring(0, i) + letter + _foundLetters.substring(i + 1); - print('Found a "' + letter + '" => "' + _foundLetters + '".'); } bool get gameWon => _foundWord; diff --git a/lib/utils/game_utils.dart b/lib/utils/game_utils.dart index 69d5b5d8c035bd523a891f43fa75a055cfd2141e..c14befc493f448c33ebebb5b18f437e1969d82a9 100644 --- a/lib/utils/game_utils.dart +++ b/lib/utils/game_utils.dart @@ -7,9 +7,13 @@ class GameUtils { } static Future<void> startGame(Data myProvider) async { - print('Starting game'); - print('- lang: ' + myProvider.lang); - print('- length: ' + myProvider.length); + print('Starting game (' + + myProvider.lang + + ' / ' + + myProvider.length + + ' / ' + + myProvider.level + + ' )'); myProvider.resetGame(); @@ -41,16 +45,12 @@ class GameUtils { print('Picked word: ' + word); } - static bool addLetter(Data myProvider, String letter) { - print('addLetter: ' + letter); + static void addLetter(Data myProvider, String letter) { myProvider.currentGuessAddLetter(letter); - return true; } - static bool removeLetter(Data myProvider) { - print('removeLetter'); + static void removeLetter(Data myProvider) { myProvider.currentGuessRemoveLetter(); - return true; } static List<String> getTips(Data myProvider, String candidate) { @@ -69,13 +69,9 @@ class GameUtils { return oldString.substring(0, index) + newChar + oldString.substring(index + 1); } - print('getTips: candidate "' + candidate + '" / word "' + word + '"'); - // Check correctly placed letters - print('Check correctly placed letters'); for (int i = 0; i < wordLength; i++) { if ((tips[i] == '') && (word[i] == candidate[i])) { - print('Found "' + word[i] + '" on the right place: ' + (i + 1).toString()); myProvider.addFoundLetter(word[i], i); word = replaceCharAt(word, i, ' '); candidate = replaceCharAt(candidate, i, ' '); @@ -84,16 +80,9 @@ class GameUtils { } // Check misplaced letters - print('Check misplaced letters'); for (int i = 0; i < wordLength; i++) { for (int j = 0; j < wordLength; j++) { if ((candidate[j] != ' ') && (candidate[j] == word[i])) { - print('Found "' + - candidate[j] + - '" on the wrong place: ' + - (j + 1).toString() + - ' instead of ' + - (i + 1).toString()); word = replaceCharAt(word, i, ' '); candidate = replaceCharAt(candidate, j, ' '); tips[j] = 'misplaced'; @@ -101,29 +90,20 @@ class GameUtils { } } - print('Finished check letters: ' + tips.toString()); - return tips; } - static bool submitWord(Data myProvider) { - print('submitWord'); - + static void submitWord(Data myProvider) { if (GameUtils.checkCurrentlyGuessedWordExists(myProvider)) { - print('Ok word allowed'); + print('Ok word allowed: "' + myProvider.currentGuess + '".'); myProvider.currentGuessSubmitWord(); } else { - print('Unknown word'); + print('Unknown word: "' + myProvider.currentGuess + '".'); myProvider.currentGuessSubmitWrongWord(); } - - return true; } static bool checkCurrentlyGuessedWordExists(Data myProvider) { - String guessedWord = myProvider.currentGuess; - print('Checking word "' + guessedWord + '"...'); - - return RandomPickWord.checkWordExists(guessedWord); + return RandomPickWord.checkWordExists(myProvider.currentGuess); } } diff --git a/lib/utils/random_pick_word.dart b/lib/utils/random_pick_word.dart index 3352625d63510dd8697a537aff055cf48d20dbe6..d514e9b648cc0251dbcee398967f015a4aa006ba 100644 --- a/lib/utils/random_pick_word.dart +++ b/lib/utils/random_pick_word.dart @@ -33,7 +33,7 @@ class RandomPickWord { String wordBaseFilename = 'words-' + length.toString() + '-' + lang; // Get full dictionary (eligible words) - print('Reload dictionary / ' + lang + ' / ' + length.toString()); + print('Reload dictionary (' + lang + ' / ' + length.toString() + ')'); try { String wordsFile = wordBaseFilename + '-' + 'dictionary'; var data = await rootBundle.loadString('assets/files/' + wordsFile + '.txt'); @@ -47,7 +47,7 @@ class RandomPickWord { } // Get guessable words list (will pick random word from) - print('Reload words list / ' + lang + ' / ' + length.toString() + ' / ' + level); + print('Reload words list (' + lang + ' / ' + length.toString() + ' / ' + level + ')'); try { String wordsFile = wordBaseFilename + '-' + level; var data = await rootBundle.loadString('assets/files/' + wordsFile + '.txt'); @@ -77,8 +77,6 @@ class RandomPickWord { final _random = new Random(); _word = wordList.elementAt(_random.nextInt(wordList.length)); } - - print('Picked word: ' + _word); } static bool checkWordExists(String word) {