Merge remote-tracking branch 'origin/master'
# Conflicts: # app/src/main/java/org/secuso/privacyfriendlysudoku/controller/SaveLoadStatistics.java # app/src/main/res/drawable/standalone_button.xml
This commit is contained in:
commit
3d110b57c5
64 changed files with 267 additions and 311 deletions
|
@ -37,7 +37,7 @@
|
||||||
<ConfirmationsSetting value="0" id="Add" />
|
<ConfirmationsSetting value="0" id="Add" />
|
||||||
<ConfirmationsSetting value="0" id="Remove" />
|
<ConfirmationsSetting value="0" id="Remove" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
package tu_darmstadt.sudoku.ui.view;
|
|
||||||
|
|
||||||
import android.app.Application;
|
|
||||||
import android.test.ApplicationTestCase;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
|
|
||||||
*/
|
|
||||||
public class ApplicationTest extends ApplicationTestCase<Application> {
|
|
||||||
public ApplicationTest() {
|
|
||||||
super(Application.class);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="tu_darmstadt.sudoku.ui.view" >
|
package="org.secuso.privacyfriendlysudoku.ui.view" >
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme" >
|
android:theme="@style/AppTheme" >
|
||||||
<activity
|
<activity
|
||||||
android:name="tu_darmstadt.sudoku.ui.MainActivity"
|
android:name="org.secuso.privacyfriendlysudoku.ui.MainActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/AppTheme.NoActionBar" >
|
android:theme="@style/AppTheme.NoActionBar" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
@ -19,24 +19,23 @@
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name="tu_darmstadt.sudoku.ui.SettingsActivity"
|
android:name="org.secuso.privacyfriendlysudoku.ui.SettingsActivity"
|
||||||
android:label="@string/title_activity_settings"
|
android:label="@string/title_activity_settings"
|
||||||
android:parentActivityName="tu_darmstadt.sudoku.ui.MainActivity" >
|
android:parentActivityName="org.secuso.privacyfriendlysudoku.ui.MainActivity" >
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name="tu_darmstadt.sudoku.ui.GameActivity"
|
android:name="org.secuso.privacyfriendlysudoku.ui.GameActivity"
|
||||||
android:label="@string/title_activity_game_view"
|
android:label="@string/title_activity_game_view"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/AppTheme.NoActionBar" >
|
android:theme="@style/AppTheme.NoActionBar" >
|
||||||
</activity>
|
</activity>
|
||||||
<activity android:name="tu_darmstadt.sudoku.ui.AboutActivity" >
|
<activity android:name="org.secuso.privacyfriendlysudoku.ui.AboutActivity" >
|
||||||
</activity>
|
</activity>
|
||||||
<activity android:name="tu_darmstadt.sudoku.ui.LoadGameActivity" >
|
<activity android:name="org.secuso.privacyfriendlysudoku.ui.LoadGameActivity" >
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name="tu_darmstadt.sudoku.ui.StatsActivity"
|
android:name="org.secuso.privacyfriendlysudoku.ui.StatsActivity"
|
||||||
android:label="@string/title_activity_stats"
|
android:theme="@style/AppTheme.NoActionBar">
|
||||||
android:theme="@style/AppTheme.NoActionBar" >
|
|
||||||
</activity>
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.controller;
|
package org.secuso.privacyfriendlysudoku.controller;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
@ -9,18 +9,19 @@ import java.util.List;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.controller.helper.GameInfoContainer;
|
import org.secuso.privacyfriendlysudoku.controller.helper.GameInfoContainer;
|
||||||
import tu_darmstadt.sudoku.game.CellConflict;
|
import org.secuso.privacyfriendlysudoku.game.CellConflict;
|
||||||
import tu_darmstadt.sudoku.game.CellConflictList;
|
import org.secuso.privacyfriendlysudoku.game.CellConflictList;
|
||||||
import tu_darmstadt.sudoku.game.GameBoard;
|
import org.secuso.privacyfriendlysudoku.game.GameBoard;
|
||||||
import tu_darmstadt.sudoku.game.GameCell;
|
import org.secuso.privacyfriendlysudoku.game.GameCell;
|
||||||
import tu_darmstadt.sudoku.game.GameDifficulty;
|
import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
|
||||||
import tu_darmstadt.sudoku.game.GameType;
|
import org.secuso.privacyfriendlysudoku.game.GameType;
|
||||||
import tu_darmstadt.sudoku.game.ICellAction;
|
import org.secuso.privacyfriendlysudoku.game.ICellAction;
|
||||||
import tu_darmstadt.sudoku.game.listener.IGameSolvedListener;
|
import org.secuso.privacyfriendlysudoku.game.listener.IGameSolvedListener;
|
||||||
import tu_darmstadt.sudoku.game.listener.IHighlightChangedListener;
|
import org.secuso.privacyfriendlysudoku.game.listener.IHighlightChangedListener;
|
||||||
import tu_darmstadt.sudoku.game.listener.IModelChangedListener;
|
import org.secuso.privacyfriendlysudoku.game.listener.IHintListener;
|
||||||
import tu_darmstadt.sudoku.game.listener.ITimerListener;
|
import org.secuso.privacyfriendlysudoku.game.listener.IModelChangedListener;
|
||||||
|
import org.secuso.privacyfriendlysudoku.game.listener.ITimerListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 06.11.2015.
|
* Created by Chris on 06.11.2015.
|
||||||
|
@ -39,6 +40,7 @@ public class GameController implements IModelChangedListener {
|
||||||
|
|
||||||
private LinkedList<IHighlightChangedListener> highlightListeners = new LinkedList<>();
|
private LinkedList<IHighlightChangedListener> highlightListeners = new LinkedList<>();
|
||||||
private LinkedList<IGameSolvedListener> solvedListeners = new LinkedList<>();
|
private LinkedList<IGameSolvedListener> solvedListeners = new LinkedList<>();
|
||||||
|
private LinkedList<IHintListener> hintListener = new LinkedList<>();
|
||||||
private boolean notifiedOnSolvedListeners = false;
|
private boolean notifiedOnSolvedListeners = false;
|
||||||
|
|
||||||
// Game
|
// Game
|
||||||
|
@ -171,10 +173,12 @@ public class GameController implements IModelChangedListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] solved = solve();
|
int[] solved = solve();
|
||||||
// TODO test every placed value so far
|
//
|
||||||
// and reveal the selected value.
|
// reveal the selected value.
|
||||||
selectValue(solved[selectedRow * getSize() + selectedCol]);
|
selectValue(solved[selectedRow * getSize() + selectedCol]);
|
||||||
usedHints++;
|
usedHints++;
|
||||||
|
|
||||||
|
notifyHintListener();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setGameType(GameType type) {
|
private void setGameType(GameType type) {
|
||||||
|
@ -553,6 +557,19 @@ public class GameController implements IModelChangedListener {
|
||||||
timerListeners.add(listener);
|
timerListeners.add(listener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void notifyHintListener() {
|
||||||
|
for (IHintListener listener : hintListener){
|
||||||
|
listener.onHintUsed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void registerHintListener(IHintListener listener){
|
||||||
|
if (!hintListener.contains(listener)){
|
||||||
|
hintListener.add(listener);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public int getUsedHints(){
|
public int getUsedHints(){
|
||||||
return usedHints;
|
return usedHints;
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.controller;
|
package org.secuso.privacyfriendlysudoku.controller;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
@ -11,7 +11,7 @@ import java.io.IOException;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.controller.helper.GameInfoContainer;
|
import org.secuso.privacyfriendlysudoku.controller.helper.GameInfoContainer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 16.11.2015.
|
* Created by Chris on 16.11.2015.
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.controller;
|
package org.secuso.privacyfriendlysudoku.controller;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 17.11.2015.
|
* Created by Chris on 17.11.2015.
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.controller;
|
package org.secuso.privacyfriendlysudoku.controller;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
@ -12,8 +12,8 @@ import java.io.IOException;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.game.GameDifficulty;
|
import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
|
||||||
import tu_darmstadt.sudoku.game.GameType;
|
import org.secuso.privacyfriendlysudoku.game.GameType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 23.11.2015.
|
* Created by Chris on 23.11.2015.
|
|
@ -1,21 +1,19 @@
|
||||||
package tu_darmstadt.sudoku.controller;
|
package org.secuso.privacyfriendlysudoku.controller;
|
||||||
|
|
||||||
import android.os.*;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.concurrent.atomic.AtomicIntegerArray;
|
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.controller.qqwing.Action;
|
import org.secuso.privacyfriendlysudoku.controller.qqwing.Action;
|
||||||
import tu_darmstadt.sudoku.controller.qqwing.PrintStyle;
|
import org.secuso.privacyfriendlysudoku.controller.qqwing.PrintStyle;
|
||||||
import tu_darmstadt.sudoku.controller.qqwing.QQWing;
|
import org.secuso.privacyfriendlysudoku.controller.qqwing.QQWing;
|
||||||
import tu_darmstadt.sudoku.controller.qqwing.Symmetry;
|
import org.secuso.privacyfriendlysudoku.controller.qqwing.Symmetry;
|
||||||
import tu_darmstadt.sudoku.game.GameBoard;
|
import org.secuso.privacyfriendlysudoku.game.GameBoard;
|
||||||
import tu_darmstadt.sudoku.game.GameDifficulty;
|
import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
|
||||||
import tu_darmstadt.sudoku.game.GameType;
|
import org.secuso.privacyfriendlysudoku.game.GameType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 21.11.2015.
|
* Created by Chris on 21.11.2015.
|
||||||
|
@ -131,7 +129,7 @@ public class QQWingController {
|
||||||
if (havePuzzle) {
|
if (havePuzzle) {
|
||||||
puzzleCount.getAndDecrement();
|
puzzleCount.getAndDecrement();
|
||||||
} else {
|
} else {
|
||||||
// TODO: Puzzle to solve is impossible.
|
// Puzzle to solve is impossible.
|
||||||
solveImpossible = true;
|
solveImpossible = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
|
@ -1,22 +1,18 @@
|
||||||
package tu_darmstadt.sudoku.controller;
|
package org.secuso.privacyfriendlysudoku.controller;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.controller.helper.GameInfoContainer;
|
import org.secuso.privacyfriendlysudoku.controller.helper.HighscoreInfoContainer;
|
||||||
import tu_darmstadt.sudoku.controller.helper.HighscoreInfoContainer;
|
import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
|
||||||
import tu_darmstadt.sudoku.game.GameDifficulty;
|
import org.secuso.privacyfriendlysudoku.game.GameType;
|
||||||
import tu_darmstadt.sudoku.game.GameType;
|
|
||||||
import tu_darmstadt.sudoku.game.listener.ITimerListener;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by TMZ_LToP on 19.11.2015.
|
* Created by TMZ_LToP on 19.11.2015.
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.controller;
|
package org.secuso.privacyfriendlysudoku.controller;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 17.11.2015.
|
* Created by Chris on 17.11.2015.
|
|
@ -1,9 +1,8 @@
|
||||||
package tu_darmstadt.sudoku.controller;
|
package org.secuso.privacyfriendlysudoku.controller;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.game.GameBoard;
|
import org.secuso.privacyfriendlysudoku.game.GameBoard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 24.11.2015.
|
* Created by Chris on 24.11.2015.
|
|
@ -1,15 +1,15 @@
|
||||||
package tu_darmstadt.sudoku.controller.helper;
|
package org.secuso.privacyfriendlysudoku.controller.helper;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.controller.GameController;
|
import org.secuso.privacyfriendlysudoku.controller.GameController;
|
||||||
import tu_darmstadt.sudoku.controller.Symbol;
|
import org.secuso.privacyfriendlysudoku.controller.Symbol;
|
||||||
import tu_darmstadt.sudoku.game.GameCell;
|
import org.secuso.privacyfriendlysudoku.game.GameCell;
|
||||||
import tu_darmstadt.sudoku.game.GameDifficulty;
|
import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
|
||||||
import tu_darmstadt.sudoku.game.GameType;
|
import org.secuso.privacyfriendlysudoku.game.GameType;
|
||||||
import tu_darmstadt.sudoku.game.ICellAction;
|
import org.secuso.privacyfriendlysudoku.game.ICellAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 17.11.2015.
|
* Created by Chris on 17.11.2015.
|
|
@ -1,8 +1,8 @@
|
||||||
package tu_darmstadt.sudoku.controller.helper;
|
package org.secuso.privacyfriendlysudoku.controller.helper;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.controller.GameController;
|
import org.secuso.privacyfriendlysudoku.controller.GameController;
|
||||||
import tu_darmstadt.sudoku.game.GameDifficulty;
|
import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
|
||||||
import tu_darmstadt.sudoku.game.GameType;
|
import org.secuso.privacyfriendlysudoku.game.GameType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 18.11.2015.
|
* Created by Chris on 18.11.2015.
|
|
@ -18,7 +18,7 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
package tu_darmstadt.sudoku.controller.qqwing;
|
package org.secuso.privacyfriendlysudoku.controller.qqwing;
|
||||||
|
|
||||||
public enum Action {
|
public enum Action {
|
||||||
NONE,
|
NONE,
|
|
@ -18,7 +18,7 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
package tu_darmstadt.sudoku.controller.qqwing;
|
package org.secuso.privacyfriendlysudoku.controller.qqwing;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* While solving the puzzle, log steps taken in a log item. This is useful for
|
* While solving the puzzle, log steps taken in a log item. This is useful for
|
|
@ -18,7 +18,7 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
package tu_darmstadt.sudoku.controller.qqwing;
|
package org.secuso.privacyfriendlysudoku.controller.qqwing;
|
||||||
|
|
||||||
public enum LogType {
|
public enum LogType {
|
||||||
GIVEN("Mark given"),
|
GIVEN("Mark given"),
|
|
@ -18,7 +18,7 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
package tu_darmstadt.sudoku.controller.qqwing;
|
package org.secuso.privacyfriendlysudoku.controller.qqwing;
|
||||||
|
|
||||||
public enum PrintStyle {
|
public enum PrintStyle {
|
||||||
ONE_LINE,
|
ONE_LINE,
|
|
@ -20,7 +20,7 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
package tu_darmstadt.sudoku.controller.qqwing;
|
package org.secuso.privacyfriendlysudoku.controller.qqwing;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -28,8 +28,8 @@ import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.game.GameDifficulty;
|
import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
|
||||||
import tu_darmstadt.sudoku.game.GameType;
|
import org.secuso.privacyfriendlysudoku.game.GameType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The board containing all the memory structures and methods for solving or
|
* The board containing all the memory structures and methods for solving or
|
|
@ -18,7 +18,7 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
package tu_darmstadt.sudoku.controller.qqwing;
|
package org.secuso.privacyfriendlysudoku.controller.qqwing;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.game;
|
package org.secuso.privacyfriendlysudoku.game;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 08.11.2015.
|
* Created by Chris on 08.11.2015.
|
|
@ -1,6 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.game;
|
package org.secuso.privacyfriendlysudoku.game;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package tu_darmstadt.sudoku.game;
|
package org.secuso.privacyfriendlysudoku.game;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.game.listener.IModelChangedListener;
|
import org.secuso.privacyfriendlysudoku.game.listener.IModelChangedListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Christopher Beckmann on 06.11.2015.
|
* Created by Christopher Beckmann on 06.11.2015.
|
|
@ -1,10 +1,10 @@
|
||||||
package tu_darmstadt.sudoku.game;
|
package org.secuso.privacyfriendlysudoku.game;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.game.listener.IModelChangedListener;
|
import org.secuso.privacyfriendlysudoku.game.listener.IModelChangedListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 06.11.2015.
|
* Created by Chris on 06.11.2015.
|
|
@ -1,10 +1,10 @@
|
||||||
package tu_darmstadt.sudoku.game;
|
package org.secuso.privacyfriendlysudoku.game;
|
||||||
|
|
||||||
import android.support.annotation.StringRes;
|
import android.support.annotation.StringRes;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.ui.view.R;
|
import org.secuso.privacyfriendlysudoku.ui.view.R;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 18.11.2015.
|
* Created by Chris on 18.11.2015.
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.game;
|
package org.secuso.privacyfriendlysudoku.game;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 09.11.2015.
|
* Created by Chris on 09.11.2015.
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.game;
|
package org.secuso.privacyfriendlysudoku.game;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 10.11.2015.
|
* Created by Chris on 10.11.2015.
|
|
@ -1,9 +1,8 @@
|
||||||
package tu_darmstadt.sudoku.game;
|
package org.secuso.privacyfriendlysudoku.game;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.ui.view.R;
|
import org.secuso.privacyfriendlysudoku.ui.view.R;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 09.11.2015.
|
* Created by Chris on 09.11.2015.
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.game;
|
package org.secuso.privacyfriendlysudoku.game;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 10.11.2015.
|
* Created by Chris on 10.11.2015.
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.game.listener;
|
package org.secuso.privacyfriendlysudoku.game.listener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 19.11.2015.
|
* Created by Chris on 19.11.2015.
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.game.listener;
|
package org.secuso.privacyfriendlysudoku.game.listener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 19.12.2015.
|
* Created by Chris on 19.12.2015.
|
|
@ -0,0 +1,8 @@
|
||||||
|
package org.secuso.privacyfriendlysudoku.game.listener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Chris on 21.01.2016.
|
||||||
|
*/
|
||||||
|
public interface IHintListener {
|
||||||
|
public void onHintUsed();
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
package tu_darmstadt.sudoku.game.listener;
|
package org.secuso.privacyfriendlysudoku.game.listener;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.game.GameCell;
|
import org.secuso.privacyfriendlysudoku.game.GameCell;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 19.11.2015.
|
* Created by Chris on 19.11.2015.
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.game.listener;
|
package org.secuso.privacyfriendlysudoku.game.listener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by TMZ_LToP on 20.11.2015.
|
* Created by TMZ_LToP on 20.11.2015.
|
|
@ -1,15 +1,12 @@
|
||||||
package tu_darmstadt.sudoku.ui;
|
package org.secuso.privacyfriendlysudoku.ui;
|
||||||
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.net.Uri;
|
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.ui.view.R;
|
import org.secuso.privacyfriendlysudoku.ui.view.R;
|
||||||
|
|
||||||
public class AboutActivity extends AppCompatActivity {
|
public class AboutActivity extends AppCompatActivity {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.ui;
|
package org.secuso.privacyfriendlysudoku.ui;
|
||||||
|
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.ui;
|
package org.secuso.privacyfriendlysudoku.ui;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
@ -26,22 +26,22 @@ import android.widget.Toast;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.controller.GameStateManager;
|
import org.secuso.privacyfriendlysudoku.controller.GameStateManager;
|
||||||
import tu_darmstadt.sudoku.controller.GameController;
|
import org.secuso.privacyfriendlysudoku.controller.GameController;
|
||||||
import tu_darmstadt.sudoku.controller.SaveLoadStatistics;
|
import org.secuso.privacyfriendlysudoku.controller.SaveLoadStatistics;
|
||||||
import tu_darmstadt.sudoku.controller.Symbol;
|
import org.secuso.privacyfriendlysudoku.controller.Symbol;
|
||||||
import tu_darmstadt.sudoku.controller.helper.GameInfoContainer;
|
import org.secuso.privacyfriendlysudoku.controller.helper.GameInfoContainer;
|
||||||
import tu_darmstadt.sudoku.game.GameDifficulty;
|
import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
|
||||||
import tu_darmstadt.sudoku.game.GameType;
|
import org.secuso.privacyfriendlysudoku.game.GameType;
|
||||||
import tu_darmstadt.sudoku.game.listener.IGameSolvedListener;
|
import org.secuso.privacyfriendlysudoku.game.listener.IGameSolvedListener;
|
||||||
import tu_darmstadt.sudoku.game.listener.ITimerListener;
|
import org.secuso.privacyfriendlysudoku.game.listener.ITimerListener;
|
||||||
import tu_darmstadt.sudoku.ui.listener.IHintDialogFragmentListener;
|
import org.secuso.privacyfriendlysudoku.ui.listener.IHintDialogFragmentListener;
|
||||||
import tu_darmstadt.sudoku.ui.listener.IResetDialogFragmentListener;
|
import org.secuso.privacyfriendlysudoku.ui.listener.IResetDialogFragmentListener;
|
||||||
import tu_darmstadt.sudoku.ui.view.DialogWinScreen;
|
import org.secuso.privacyfriendlysudoku.ui.view.DialogWinScreen;
|
||||||
import tu_darmstadt.sudoku.ui.view.R;
|
import org.secuso.privacyfriendlysudoku.ui.view.R;
|
||||||
import tu_darmstadt.sudoku.ui.view.SudokuFieldLayout;
|
import org.secuso.privacyfriendlysudoku.ui.view.SudokuFieldLayout;
|
||||||
import tu_darmstadt.sudoku.ui.view.SudokuKeyboardLayout;
|
import org.secuso.privacyfriendlysudoku.ui.view.SudokuKeyboardLayout;
|
||||||
import tu_darmstadt.sudoku.ui.view.SudokuSpecialButtonLayout;
|
import org.secuso.privacyfriendlysudoku.ui.view.SudokuSpecialButtonLayout;
|
||||||
|
|
||||||
public class GameActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, IGameSolvedListener ,ITimerListener, IHintDialogFragmentListener, IResetDialogFragmentListener {
|
public class GameActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, IGameSolvedListener ,ITimerListener, IHintDialogFragmentListener, IResetDialogFragmentListener {
|
||||||
|
|
||||||
|
@ -208,8 +208,9 @@ public class GameActivity extends AppCompatActivity implements NavigationView.On
|
||||||
case R.id.nav_newgame:
|
case R.id.nav_newgame:
|
||||||
//create new game
|
//create new game
|
||||||
intent = new Intent(this, MainActivity.class);
|
intent = new Intent(this, MainActivity.class);
|
||||||
finish();
|
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.menu_settings:
|
case R.id.menu_settings:
|
||||||
|
@ -220,7 +221,6 @@ public class GameActivity extends AppCompatActivity implements NavigationView.On
|
||||||
|
|
||||||
case R.id.nav_highscore:
|
case R.id.nav_highscore:
|
||||||
// see highscore list
|
// see highscore list
|
||||||
|
|
||||||
intent = new Intent(this, StatsActivity.class);
|
intent = new Intent(this, StatsActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
break;
|
break;
|
||||||
|
@ -252,7 +252,7 @@ public class GameActivity extends AppCompatActivity implements NavigationView.On
|
||||||
gameController.pauseTimer();
|
gameController.pauseTimer();
|
||||||
gameController.deleteGame(this);
|
gameController.deleteGame(this);
|
||||||
|
|
||||||
Toast t = Toast.makeText(this,"Congratulations you have solved the puzzle!", Toast.LENGTH_SHORT);
|
Toast t = Toast.makeText(this, R.string.win_text, Toast.LENGTH_SHORT);
|
||||||
t.show();
|
t.show();
|
||||||
|
|
||||||
statistics.saveGameStats();
|
statistics.saveGameStats();
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.ui;
|
package org.secuso.privacyfriendlysudoku.ui;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
@ -29,11 +29,11 @@ import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.controller.GameStateManager;
|
import org.secuso.privacyfriendlysudoku.controller.GameStateManager;
|
||||||
import tu_darmstadt.sudoku.controller.helper.GameInfoContainer;
|
import org.secuso.privacyfriendlysudoku.controller.helper.GameInfoContainer;
|
||||||
import tu_darmstadt.sudoku.game.GameDifficulty;
|
import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
|
||||||
import tu_darmstadt.sudoku.ui.listener.IDeleteDialogFragmentListener;
|
import org.secuso.privacyfriendlysudoku.ui.listener.IDeleteDialogFragmentListener;
|
||||||
import tu_darmstadt.sudoku.ui.view.R;
|
import org.secuso.privacyfriendlysudoku.ui.view.R;
|
||||||
|
|
||||||
public class LoadGameActivity extends AppCompatActivity implements IDeleteDialogFragmentListener {
|
public class LoadGameActivity extends AppCompatActivity implements IDeleteDialogFragmentListener {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package tu_darmstadt.sudoku.ui;
|
package org.secuso.privacyfriendlysudoku.ui;
|
||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.design.widget.NavigationView;
|
import android.support.design.widget.NavigationView;
|
||||||
import android.support.v4.content.SharedPreferencesCompat;
|
|
||||||
import android.support.v4.view.GravityCompat;
|
import android.support.v4.view.GravityCompat;
|
||||||
import android.support.v4.widget.DrawerLayout;
|
import android.support.v4.widget.DrawerLayout;
|
||||||
import android.support.v7.app.ActionBarDrawerToggle;
|
import android.support.v7.app.ActionBarDrawerToggle;
|
||||||
|
@ -33,13 +33,13 @@ import android.widget.Toast;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.controller.GameStateManager;
|
import org.secuso.privacyfriendlysudoku.controller.GameStateManager;
|
||||||
import tu_darmstadt.sudoku.controller.NewLevelManager;
|
import org.secuso.privacyfriendlysudoku.controller.NewLevelManager;
|
||||||
import tu_darmstadt.sudoku.controller.helper.GameInfoContainer;
|
import org.secuso.privacyfriendlysudoku.controller.helper.GameInfoContainer;
|
||||||
import tu_darmstadt.sudoku.game.GameDifficulty;
|
import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
|
||||||
import tu_darmstadt.sudoku.game.GameType;
|
import org.secuso.privacyfriendlysudoku.game.GameType;
|
||||||
import tu_darmstadt.sudoku.ui.view.DialogWinScreen;
|
import org.secuso.privacyfriendlysudoku.ui.view.DialogWinScreen;
|
||||||
import tu_darmstadt.sudoku.ui.view.R;
|
import org.secuso.privacyfriendlysudoku.ui.view.R;
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener{
|
public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener{
|
||||||
|
|
||||||
|
@ -161,18 +161,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
|
||||||
if(view instanceof Button) {
|
if(view instanceof Button) {
|
||||||
Button b = (Button)view;
|
Button b = (Button)view;
|
||||||
switch(b.getId()) {
|
switch(b.getId()) {
|
||||||
/**case R.id.aboutButton:
|
|
||||||
i = new Intent(this, AboutActivity.class);
|
|
||||||
break;
|
|
||||||
case R.id.highscoreButton:
|
|
||||||
i = new Intent(this,StatsActivity.class);
|
|
||||||
break;
|
|
||||||
case R.id.settingsButton:
|
|
||||||
i = new Intent(this, SettingsActivity.class);
|
|
||||||
break;
|
|
||||||
case R.id.helpButton:
|
|
||||||
// TODO: create help page.. what is supposed to be in there?!
|
|
||||||
break;*/
|
|
||||||
case R.id.continueButton:
|
case R.id.continueButton:
|
||||||
i = new Intent(this, LoadGameActivity.class);
|
i = new Intent(this, LoadGameActivity.class);
|
||||||
break;
|
break;
|
||||||
|
@ -222,8 +210,10 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
|
||||||
List<GameInfoContainer> gic = fm.loadGameStateInfo();
|
List<GameInfoContainer> gic = fm.loadGameStateInfo();
|
||||||
if(gic.size() > 0) {
|
if(gic.size() > 0) {
|
||||||
continueButton.setEnabled(true);
|
continueButton.setEnabled(true);
|
||||||
|
continueButton.setBackgroundResource(R.drawable.standalone_button);
|
||||||
} else {
|
} else {
|
||||||
continueButton.setEnabled(false);
|
continueButton.setEnabled(false);
|
||||||
|
continueButton.setBackgroundResource(R.drawable.inactive_button);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
package tu_darmstadt.sudoku.ui;
|
package org.secuso.privacyfriendlysudoku.ui;
|
||||||
|
|
||||||
|
|
||||||
import android.annotation.TargetApi;
|
import android.annotation.TargetApi;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.media.Ringtone;
|
|
||||||
import android.media.RingtoneManager;
|
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.ListPreference;
|
import android.preference.ListPreference;
|
||||||
|
@ -16,11 +12,9 @@ import android.preference.PreferenceActivity;
|
||||||
import android.support.v7.app.ActionBar;
|
import android.support.v7.app.ActionBar;
|
||||||
import android.preference.PreferenceFragment;
|
import android.preference.PreferenceFragment;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.preference.RingtonePreference;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.ui.view.R;
|
import org.secuso.privacyfriendlysudoku.ui.view.R;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.ui;
|
package org.secuso.privacyfriendlysudoku.ui;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
@ -24,10 +24,10 @@ import android.widget.TextView;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.controller.SaveLoadStatistics;
|
import org.secuso.privacyfriendlysudoku.controller.SaveLoadStatistics;
|
||||||
import tu_darmstadt.sudoku.controller.helper.HighscoreInfoContainer;
|
import org.secuso.privacyfriendlysudoku.controller.helper.HighscoreInfoContainer;
|
||||||
import tu_darmstadt.sudoku.game.GameType;
|
import org.secuso.privacyfriendlysudoku.game.GameType;
|
||||||
import tu_darmstadt.sudoku.ui.view.R;
|
import org.secuso.privacyfriendlysudoku.ui.view.R;
|
||||||
|
|
||||||
public class StatsActivity extends AppCompatActivity {
|
public class StatsActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ public class StatsActivity extends AppCompatActivity {
|
||||||
SaveLoadStatistics.resetStats(this);
|
SaveLoadStatistics.resetStats(this);
|
||||||
mSectionsPagerAdapter.refresh(this);
|
mSectionsPagerAdapter.refresh(this);
|
||||||
return true;
|
return true;
|
||||||
case R.id.home:
|
case android.R.id.home:
|
||||||
finish();
|
finish();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
|
@ -1,6 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.ui.listener;
|
package org.secuso.privacyfriendlysudoku.ui.listener;
|
||||||
|
|
||||||
import android.app.DialogFragment;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 24.11.2015.
|
* Created by Chris on 24.11.2015.
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.ui.listener;
|
package org.secuso.privacyfriendlysudoku.ui.listener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 17.01.2016.
|
* Created by Chris on 17.01.2016.
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.ui.listener;
|
package org.secuso.privacyfriendlysudoku.ui.listener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 19.01.2016.
|
* Created by Chris on 19.01.2016.
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.ui.view;
|
package org.secuso.privacyfriendlysudoku.ui.view;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Chris on 12.11.2015.
|
* Created by Chris on 12.11.2015.
|
|
@ -1,24 +1,16 @@
|
||||||
package tu_darmstadt.sudoku.ui.view;
|
package org.secuso.privacyfriendlysudoku.ui.view;
|
||||||
|
|
||||||
import android.app.DialogFragment;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.WindowManager;
|
|
||||||
import android.view.animation.Animation;
|
|
||||||
import android.view.animation.AnimationSet;
|
|
||||||
import android.view.animation.AnimationUtils;
|
|
||||||
import android.view.animation.LinearInterpolator;
|
|
||||||
import android.view.animation.RotateAnimation;
|
|
||||||
import android.widget.GridLayout;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.controller.GameController;
|
import org.secuso.privacyfriendlysudoku.controller.GameController;
|
||||||
import tu_darmstadt.sudoku.game.GameDifficulty;
|
import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
|
||||||
import tu_darmstadt.sudoku.game.GameType;
|
import org.secuso.privacyfriendlysudoku.game.GameType;
|
||||||
import tu_darmstadt.sudoku.ui.GameActivity;
|
import org.secuso.privacyfriendlysudoku.ui.GameActivity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by TMZ_LToP on 11.12.2015.
|
* Created by TMZ_LToP on 11.12.2015.
|
|
@ -1,10 +1,8 @@
|
||||||
package tu_darmstadt.sudoku.ui.view;
|
package org.secuso.privacyfriendlysudoku.ui.view;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageButton;
|
|
||||||
import android.widget.ToggleButton;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by TMZ_LToP on 12.11.2015.
|
* Created by TMZ_LToP on 12.11.2015.
|
|
@ -1,7 +1,6 @@
|
||||||
package tu_darmstadt.sudoku.ui.view;
|
package org.secuso.privacyfriendlysudoku.ui.view;
|
||||||
|
|
||||||
import android.support.annotation.DrawableRes;
|
import android.support.annotation.DrawableRes;
|
||||||
import android.support.annotation.StringRes;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.ui.view;
|
package org.secuso.privacyfriendlysudoku.ui.view;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
|
@ -10,8 +10,8 @@ import android.util.AttributeSet;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.game.GameCell;
|
import org.secuso.privacyfriendlysudoku.game.GameCell;
|
||||||
import tu_darmstadt.sudoku.controller.Symbol;
|
import org.secuso.privacyfriendlysudoku.controller.Symbol;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by TMZ_LToP on 10.11.2015.
|
* Created by TMZ_LToP on 10.11.2015.
|
|
@ -1,11 +1,10 @@
|
||||||
package tu_darmstadt.sudoku.ui.view;
|
package org.secuso.privacyfriendlysudoku.ui.view;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.graphics.Point;
|
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -13,11 +12,11 @@ import android.widget.RelativeLayout;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.controller.GameController;
|
import org.secuso.privacyfriendlysudoku.controller.GameController;
|
||||||
import tu_darmstadt.sudoku.controller.Symbol;
|
import org.secuso.privacyfriendlysudoku.controller.Symbol;
|
||||||
import tu_darmstadt.sudoku.game.GameCell;
|
import org.secuso.privacyfriendlysudoku.game.GameCell;
|
||||||
import tu_darmstadt.sudoku.game.ICellAction;
|
import org.secuso.privacyfriendlysudoku.game.ICellAction;
|
||||||
import tu_darmstadt.sudoku.game.listener.IHighlightChangedListener;
|
import org.secuso.privacyfriendlysudoku.game.listener.IHighlightChangedListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Timm Lippert on 11.11.2015.
|
* Created by Timm Lippert on 11.11.2015.
|
|
@ -1,14 +1,7 @@
|
||||||
package tu_darmstadt.sudoku.ui.view;
|
package org.secuso.privacyfriendlysudoku.ui.view;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.Dialog;
|
|
||||||
import android.app.DialogFragment;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.os.Bundle;
|
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
|
@ -19,12 +12,9 @@ import android.widget.GridLayout;
|
||||||
import android.widget.GridView;
|
import android.widget.GridView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import org.secuso.privacyfriendlysudoku.controller.GameController;
|
||||||
|
import org.secuso.privacyfriendlysudoku.controller.Symbol;
|
||||||
import tu_darmstadt.sudoku.controller.GameController;
|
import org.secuso.privacyfriendlysudoku.game.listener.IHighlightChangedListener;
|
||||||
import tu_darmstadt.sudoku.controller.Symbol;
|
|
||||||
import tu_darmstadt.sudoku.game.listener.IHighlightChangedListener;
|
|
||||||
import tu_darmstadt.sudoku.ui.listener.IDeleteDialogFragmentListener;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by TMZ_LToP on 12.11.2015.
|
* Created by TMZ_LToP on 12.11.2015.
|
|
@ -1,7 +1,6 @@
|
||||||
package tu_darmstadt.sudoku.ui.view;
|
package org.secuso.privacyfriendlysudoku.ui.view;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Canvas;
|
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package tu_darmstadt.sudoku.ui.view;
|
package org.secuso.privacyfriendlysudoku.ui.view;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
@ -21,8 +21,8 @@ import android.widget.Toast;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.controller.GameController;
|
import org.secuso.privacyfriendlysudoku.controller.GameController;
|
||||||
import tu_darmstadt.sudoku.ui.listener.IHintDialogFragmentListener;
|
import org.secuso.privacyfriendlysudoku.ui.listener.IHintDialogFragmentListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by TMZ_LToP on 17.11.2015.
|
* Created by TMZ_LToP on 17.11.2015.
|
11
app/src/main/res/drawable/inactive_button.xml
Normal file
11
app/src/main/res/drawable/inactive_button.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
<!-- default -->
|
||||||
|
<item>
|
||||||
|
<shape >
|
||||||
|
<solid
|
||||||
|
android:color="@color/middlegrey" />
|
||||||
|
<corners android:radius="6dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
|
@ -1,6 +1,11 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"
|
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
>
|
<!-- default -->
|
||||||
<gradient android:endColor="@color/colorPrimary" android:startColor="@color/colorPrimary" />
|
<item>
|
||||||
<corners android:radius="6dp" />
|
<shape >
|
||||||
</shape>
|
<solid
|
||||||
|
android:color="@color/colorPrimary" />
|
||||||
|
<corners android:radius="6dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
||||||
|
|
|
@ -90,4 +90,19 @@
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:autoLink="web"/>
|
android:autoLink="web"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/qqWing"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/about_qqwing"
|
||||||
|
android:layout_gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/about_qqwingLink"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:autoLink="web"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
<android.support.design.widget.AppBarLayout android:id="@+id/appbar"
|
<android.support.design.widget.AppBarLayout android:id="@+id/appbar"
|
||||||
android:layout_width="match_parent" android:layout_height="wrap_content"
|
android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||||
android:paddingTop="@dimen/appbar_padding_top"
|
|
||||||
android:theme="@style/AppTheme.AppBarOverlay">
|
android:theme="@style/AppTheme.AppBarOverlay">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar android:id="@+id/toolbar"
|
<android.support.v7.widget.Toolbar android:id="@+id/toolbar"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
tools:showIn="@layout/app_bar_game_view" tools:context="tu_darmstadt.sudoku.activity.GameActivity">
|
tools:showIn="@layout/app_bar_game_view" tools:context="tu_darmstadt.sudoku.activity.GameActivity">
|
||||||
<tu_darmstadt.sudoku.ui.view.SudokuFieldLayout
|
<org.secuso.privacyfriendlysudoku.ui.view.SudokuFieldLayout
|
||||||
android:id="@+id/sudokuLayout"
|
android:id="@+id/sudokuLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -24,23 +24,23 @@
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:weightSum="3">
|
android:weightSum="3">
|
||||||
|
|
||||||
<tu_darmstadt.sudoku.ui.view.SudokuKeyboardLayout
|
<org.secuso.privacyfriendlysudoku.ui.view.SudokuKeyboardLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0px"
|
||||||
android:id="@+id/sudokuKeyboardLayout"
|
android:id="@+id/sudokuKeyboardLayout"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
android:weightSum="2">
|
android:weightSum="2">
|
||||||
|
|
||||||
</tu_darmstadt.sudoku.ui.view.SudokuKeyboardLayout>
|
</org.secuso.privacyfriendlysudoku.ui.view.SudokuKeyboardLayout>
|
||||||
|
|
||||||
<tu_darmstadt.sudoku.ui.view.SudokuSpecialButtonLayout
|
<org.secuso.privacyfriendlysudoku.ui.view.SudokuSpecialButtonLayout
|
||||||
android:id="@+id/sudokuSpecialLayout"
|
android:id="@+id/sudokuSpecialLayout"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1">
|
||||||
|
|
||||||
</tu_darmstadt.sudoku.ui.view.SudokuSpecialButtonLayout>
|
</org.secuso.privacyfriendlysudoku.ui.view.SudokuSpecialButtonLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent" android:layout_height="@dimen/nav_header_height"
|
|
||||||
android:background="@drawable/side_nav_bar"
|
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
|
||||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark" android:orientation="vertical"
|
|
||||||
android:gravity="bottom">
|
|
||||||
|
|
||||||
<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content"
|
|
||||||
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
|
||||||
android:src="@android:drawable/sym_def_app_icon" android:id="@+id/imageView" />
|
|
||||||
|
|
||||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
|
||||||
android:paddingTop="@dimen/nav_header_vertical_spacing" android:text="Sudoku"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
|
|
||||||
|
|
||||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
|
|
||||||
android:text="@string/description" android:id="@+id/textView" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
|
@ -33,5 +33,17 @@
|
||||||
<string name="difficulty_easy">Leicht</string>
|
<string name="difficulty_easy">Leicht</string>
|
||||||
<string name="difficulty_moderate">Normal</string>
|
<string name="difficulty_moderate">Normal</string>
|
||||||
<string name="difficulty_hard">Schwer</string>
|
<string name="difficulty_hard">Schwer</string>
|
||||||
|
<string name="about_qqwing">Diese App benutzt QQWing.</string>
|
||||||
|
<string name="average_time">࢝ Zeit:</string>
|
||||||
|
<string name="cancel">Abbrechen</string>
|
||||||
|
<string name="description">eine privacy friendly App</string>
|
||||||
|
<string name="gametype_unspecified">Unspezifiziert</string>
|
||||||
|
<string name="generating">Generiere neue Level im Hintergrund…</string>
|
||||||
|
<string name="hint_confirmation">Bist du sicher, dass du einen Hinweis verwenden möchtest? Wenn Hinweise benutzt wurden, kann in dem Spiel keine Bestzeit mehr erreicht werden.</string>
|
||||||
|
<string name="hint_confirmation_confirm">Benutzen</string>
|
||||||
|
<string name="loadgame_delete_confirm">Löschen</string>
|
||||||
|
<string name="hint_usage">Wähle ein gültiges Feld aus und drücke dann auf den Hinweis Knopf um dann das makierte Feld aufzulösen.</string>
|
||||||
|
<string name="loadgame_delete_confirmation">Bist du sicher, dass du den Spielstand löschen möchtest?</string>
|
||||||
|
<string name="menu_continue_game">Spiel Fortsetzen</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
|
@ -1,5 +1,5 @@
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Sudoku</string>
|
<string name="app_name" translatable="false">Sudoku</string>
|
||||||
<string name="title_activity_game_view">Sudoku</string>
|
<string name="title_activity_game_view">Sudoku</string>
|
||||||
|
|
||||||
<string name="cancel">Cancel</string>
|
<string name="cancel">Cancel</string>
|
||||||
|
@ -15,13 +15,13 @@
|
||||||
<string name="menu_reset">Reset Board</string>
|
<string name="menu_reset">Reset Board</string>
|
||||||
<string name="menu_continue_game">Continue Game</string>
|
<string name="menu_continue_game">Continue Game</string>
|
||||||
|
|
||||||
<string name="description">a privacy friendly logic puzzle</string>
|
<string name="description">a privacy friendly app</string>
|
||||||
|
|
||||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||||
|
|
||||||
<string name="title_activity_load_game">Load Game</string>
|
<string name="title_activity_load_game">Load Game</string>
|
||||||
<string name="generating">Generating new level in the background...</string>
|
<string name="generating">Generating new level in the background…</string>
|
||||||
|
|
||||||
<!-- ###SETTINGS### -->
|
<!-- ###SETTINGS### -->
|
||||||
<string name="title_activity_settings">Settings</string>
|
<string name="title_activity_settings">Settings</string>
|
||||||
|
@ -59,15 +59,17 @@
|
||||||
<string name="pref_automatic_note_deletion_summary">Automatically remove notes when setting values on connected cells</string>
|
<string name="pref_automatic_note_deletion_summary">Automatically remove notes when setting values on connected cells</string>
|
||||||
|
|
||||||
<!-- ###ABOUT### -->
|
<!-- ###ABOUT### -->
|
||||||
<string name="app_name_long">Privacy friendly Sudoku</string>
|
<string name="app_name_long" translatable="false">Privacy friendly Sudoku</string>
|
||||||
<string name="version_number">v0.9</string>
|
<string name="version_number">v0.9</string>
|
||||||
<string name="about_author">Author:</string>
|
<string name="about_author">Author:</string>
|
||||||
<string name="about_author_names">Christopher Beckmann, Timm Lippert</string>
|
<string name="about_author_names" translatable="false">Christopher Beckmann, Timm Lippert</string>
|
||||||
<string name="about_affiliation">In affiliation with:</string>
|
<string name="about_affiliation">In affiliation with:</string>
|
||||||
<string name="privacy_friendly">This application belongs to the Privacy Friendly Apps.</string>
|
<string name="privacy_friendly">This application belongs to the Privacy Friendly Apps.</string>
|
||||||
<string name="qqwing">This application uses a modified version of QQWing v1.3.4</string>
|
<string name="qqwing">This application uses a modified version of QQWing v1.3.4</string>
|
||||||
<string name="more_info">More information can be found on:</string>
|
<string name="more_info">More information can be found on:</string>
|
||||||
<string name="url"><a href="https://www.secuso.informatik.tu-darmstadt.de/en/research/results/">https://www.secuso.org</a></string>
|
<string name="url"><a href="https://www.secuso.informatik.tu-darmstadt.de/en/research/results/">https://www.secuso.org</a></string>
|
||||||
|
<string name="about_qqwing">This App uses QQWing.</string>
|
||||||
|
<string name="about_qqwingLink"><a href="http://qqwing.com/download.html">http://qqwing.com/</a></string>
|
||||||
|
|
||||||
<!-- ###GameDifficulty### -->
|
<!-- ###GameDifficulty### -->
|
||||||
<string name="difficulty_easy">Easy</string>
|
<string name="difficulty_easy">Easy</string>
|
||||||
|
@ -75,13 +77,13 @@
|
||||||
<string name="difficulty_hard">Hard</string>
|
<string name="difficulty_hard">Hard</string>
|
||||||
|
|
||||||
<!--###GameActivity -->
|
<!--###GameActivity -->
|
||||||
<string name="Sudoku">Sudoku</string>
|
<string name="Sudoku" translatable="false">Sudoku</string>
|
||||||
<string name="gametype_default_9x9">Standart Sudoku 9x9</string>
|
<string name="gametype_default_9x9" translatable="false">Standard Sudoku 9x9</string>
|
||||||
<string name="gametype_default_6x6">Standart Sudoku 6x6</string>
|
<string name="gametype_default_6x6" translatable="false">Standard Sudoku 6x6</string>
|
||||||
<string name="gametype_unspecified">Unspec</string>
|
<string name="gametype_unspecified">Unspecified</string>
|
||||||
<string name="gametype_default_12x12">Standart Sudoku 12x12</string>
|
<string name="gametype_default_12x12" translatable="false">Standard Sudoku 12x12</string>
|
||||||
<string name="gametype_x_9x9">X Sudoku 9x9</string>
|
<string name="gametype_x_9x9" translatable="false">X Sudoku 9x9</string>
|
||||||
<string name="gametype_hyper_9x9">Hyper Sudoku 9x9</string>
|
<string name="gametype_hyper_9x9" translatable="false">Hyper Sudoku 9x9</string>
|
||||||
<string name="title_activity_stats_game">Statistics</string>
|
<string name="title_activity_stats_game">Statistics</string>
|
||||||
<string name="hint_usage">Select a valid field and then press the hint button to reveal the solution.</string>
|
<string name="hint_usage">Select a valid field and then press the hint button to reveal the solution.</string>
|
||||||
<string name="hint_confirmation">Are you sure you want to use this hint? When using hints, you will not be able to achieve a personal best time.</string>
|
<string name="hint_confirmation">Are you sure you want to use this hint? When using hints, you will not be able to achieve a personal best time.</string>
|
||||||
|
@ -105,7 +107,7 @@
|
||||||
|
|
||||||
|
|
||||||
<!--### Win Strings -->
|
<!--### Win Strings -->
|
||||||
<string name="win_text">Congratulations, you have solved the puzzle.</string>
|
<string name="win_text">Congratulations, you have solved the puzzle!</string>
|
||||||
<string name="win_button_text">OK!</string>
|
<string name="win_button_text">continue</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
<!-- These settings headers are only used on tablets. -->
|
<!-- These settings headers are only used on tablets. -->
|
||||||
|
|
||||||
<header android:fragment="tu_darmstadt.sudoku.ui.SettingsActivity$GamePreferenceFragment"
|
<header android:fragment="org.secuso.privacyfriendlysudoku.ui.SettingsActivity$GamePreferenceFragment"
|
||||||
android:title="@string/pref_header_game" android:icon="@drawable/ic_info_black_24dp" />
|
android:title="@string/pref_header_game" android:icon="@drawable/ic_info_black_24dp" />
|
||||||
|
|
||||||
<header
|
<header
|
||||||
android:fragment="tu_darmstadt.sudoku.ui.SettingsActivity$HighlightingPreferenceFragment"
|
android:fragment="org.secuso.privacyfriendlysudoku.ui.SettingsActivity$HighlightingPreferenceFragment"
|
||||||
android:title="Highlighting"
|
android:title="Highlighting"
|
||||||
android:icon="@drawable/ic_notifications_black_24dp" />
|
android:icon="@drawable/ic_notifications_black_24dp" />
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package tu_darmstadt.sudoku.controller;
|
package org.secuso.privacyfriendlysudoku.controller;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import tu_darmstadt.sudoku.controller.helper.GameInfoContainer;
|
import org.secuso.privacyfriendlysudoku.controller.helper.GameInfoContainer;
|
||||||
import tu_darmstadt.sudoku.game.GameDifficulty;
|
import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
|
||||||
import tu_darmstadt.sudoku.game.GameType;
|
import org.secuso.privacyfriendlysudoku.game.GameType;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
|
@ -1,17 +1,12 @@
|
||||||
package tu_darmstadt.sudoku.game.solver;
|
package org.secuso.privacyfriendlysudoku.game.solver;
|
||||||
|
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import org.secuso.privacyfriendlysudoku.controller.GameController;
|
||||||
|
import org.secuso.privacyfriendlysudoku.controller.helper.GameInfoContainer;
|
||||||
import tu_darmstadt.sudoku.controller.GameController;
|
import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
|
||||||
import tu_darmstadt.sudoku.controller.helper.GameInfoContainer;
|
import org.secuso.privacyfriendlysudoku.game.GameType;
|
||||||
import tu_darmstadt.sudoku.game.GameBoard;
|
|
||||||
import tu_darmstadt.sudoku.game.GameDifficulty;
|
|
||||||
import tu_darmstadt.sudoku.game.GameType;
|
|
||||||
|
|
||||||
import static junit.framework.Assert.assertEquals;
|
import static junit.framework.Assert.assertEquals;
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package tu_darmstadt.sudoku.ui.view;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To work on unit tests, switch the Test Artifact in the Build Variants view.
|
|
||||||
*/
|
|
||||||
public class ExampleUnitTest {
|
|
||||||
@Test
|
|
||||||
public void addition_isCorrect() throws Exception {
|
|
||||||
assertEquals(4, 2 + 2);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue