From c36badaf1872db13a5eb05a1c2bea655a7c5db1f Mon Sep 17 00:00:00 2001 From: uykek Date: Tue, 19 May 2020 22:36:24 +0200 Subject: [PATCH] Add setter for QQWing's Random attribute that lets you initialize it with a seed --- .../privacyfriendlysudoku/controller/qqwing/QQWing.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/controller/qqwing/QQWing.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/controller/qqwing/QQWing.java index f57efd5..ee5dfb8 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/controller/qqwing/QQWing.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/controller/qqwing/QQWing.java @@ -199,6 +199,10 @@ public class QQWing { return reset(); } + public void setRandom(int seed) { + random = new Random(seed); + } + /** * Reset the board to its initial state with only the givens. This method * clears any solution, resets statistics, and clears any history messages.