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 java.io.StringBufferInputStream;
import tu_darmstadt.sudoku.game.GameBoard; import tu_darmstadt.sudoku.game.GameBoard;
import tu_darmstadt.sudoku.game.GameType;
/** /**
* Created by Chris on 16.11.2015. * Created by Chris on 16.11.2015.
@ -47,7 +48,7 @@ public class FileManager {
String[] levels = saves.split("###"); String[] levels = saves.split("###");
for(String level : levels) { for(String level : levels) {
String[] values = level.split("|"); 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(); StringBuilder sb = new StringBuilder();
sb.append("###"); // TODO add some game information sb.append("###"); // TODO add some game information
sb.append(gameType); sb.append(gameType.name());
sb.append("|"); sb.append("|");
// add every fixed cell // add every fixed cell

View file

@ -100,13 +100,11 @@ public class MainActivity extends AppCompatActivity {
i.putExtra("gameDifficulty", gameDifficulty); i.putExtra("gameDifficulty", gameDifficulty);
break; break;
default: default:
i = getIntent();
} }
} }
if(i == null) { if(i != null) {
i = getIntent(); startActivity(i);
} }
startActivity(i);
} }
@Override @Override