Bugfix in MainActivity.
This commit is contained in:
parent
e640ae9b31
commit
93cf408ea5
3 changed files with 5 additions and 6 deletions
|
@ -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]);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -100,13 +100,11 @@ public class MainActivity extends AppCompatActivity {
|
|||
i.putExtra("gameDifficulty", gameDifficulty);
|
||||
break;
|
||||
default:
|
||||
i = getIntent();
|
||||
}
|
||||
}
|
||||
if(i == null) {
|
||||
i = getIntent();
|
||||
if(i != null) {
|
||||
startActivity(i);
|
||||
}
|
||||
startActivity(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue