Bugfix in MainActivity.

This commit is contained in:
Christopher Beckmann 2015-11-16 23:32:35 +01:00
parent e640ae9b31
commit 93cf408ea5
3 changed files with 5 additions and 6 deletions

View file

@ -12,6 +12,7 @@ import java.io.IOException;
import java.io.StringBufferInputStream;
import tu_darmstadt.sudoku.game.GameBoard;
import tu_darmstadt.sudoku.game.GameType;
/**
* Created by Chris on 16.11.2015.
@ -47,7 +48,7 @@ public class FileManager {
String[] levels = saves.split("###");
for(String level : levels) {
String[] values = level.split("|");
int size = Integer.valueOf(values[0]);
GameType type = Enum.valueOf(GameType.class, values[0]);
}

View file

@ -351,7 +351,7 @@ public String getStringRepresentation() {
StringBuilder sb = new StringBuilder();
sb.append("###"); // TODO add some game information
sb.append(gameType);
sb.append(gameType.name());
sb.append("|");
// add every fixed cell

View file

@ -100,14 +100,12 @@ public class MainActivity extends AppCompatActivity {
i.putExtra("gameDifficulty", gameDifficulty);
break;
default:
i = getIntent();
}
}
if(i == null) {
i = getIntent();
}
if(i != null) {
startActivity(i);
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {