From 9f999b5512b090dfd0b621a28154cd71f7cbd9a6 Mon Sep 17 00:00:00 2001 From: ErikWaegerle Date: Wed, 27 May 2020 20:04:08 +0200 Subject: [PATCH] Added the method loadNewDailySudokuLevel. Is responsible for loading the DailySudoku. --- .../controller/GameController.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/controller/GameController.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/controller/GameController.java index f2bb7f0..e58ddd3 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/controller/GameController.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/controller/GameController.java @@ -111,6 +111,17 @@ public class GameController implements IModelChangedListener, Parcelable { newLevelManager.checkAndRestock(); } + public void loadNewDailySudokuLevel(GameDifficulty gameDifficulty) { + NewLevelManager newLevelManager = NewLevelManager.getInstance(context, settings); + + int[] level = newLevelManager.loadDailySudoku(); + + loadLevel(new GameInfoContainer(DAILY_SUDOKU_ID, gameDifficulty, GameType.Default_9x9, level, null, null)); + + newLevelManager.checkAndRestock(); + + } + public int getTime() { return time; }