public Board board;
public int[] boardSize=new int[2];
- public int difficulty=1; // 1=Hard, 2=Easy
+ public int difficulty=1; // 1=Easy, 2=Hard
public int size=3; // 1=Small, 2=Medium, 3=Big
public boolean gravity=true;
public boolean timeCounter=true;
}
/** Called when the activity is first created. */
- @Override
- public void onCreate() {
- super.onCreate();
- PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
- }
-
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
+ setOptions();
+ }
+
public void setOptions() {
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
view.onTimeCounterActivate();
}
- if (needsReset) {
+ if (needsReset && (view != null)) {
view.reset();
}
}