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 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]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -100,14 +100,12 @@ 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
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
|
Loading…
Reference in a new issue