fixing the axes of the saveState
This commit is contained in:
parent
520abea99c
commit
7ae1795911
|
|
@ -360,7 +360,7 @@ public class Simulator extends Thread {
|
||||||
for(int x=0;x<getWidth();x++) {
|
for(int x=0;x<getWidth();x++) {
|
||||||
String sumElementToLine="";
|
String sumElementToLine="";
|
||||||
for(int y=0;y<getHeight();y++) {
|
for(int y=0;y<getHeight();y++) {
|
||||||
sumElementToLine+=(Integer.toString(getCell(x, y)));
|
sumElementToLine+=(Integer.toString(getCell(y, x)));
|
||||||
if(y<getHeight()-1) {
|
if(y<getHeight()-1) {
|
||||||
sumElementToLine+=";";
|
sumElementToLine+=";";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -327,9 +327,7 @@ public class MyInterface extends JFrame {
|
||||||
String fileName=SelectFile();
|
String fileName=SelectFile();
|
||||||
if (fileName.length()>0) {
|
if (fileName.length()>0) {
|
||||||
ArrayList<String> content = mySimu.getSaveState();
|
ArrayList<String> content = mySimu.getSaveState();
|
||||||
|
|
||||||
String[] strArr = Arrays.copyOf(content.toArray(), content.toArray().length, String[].class);
|
String[] strArr = Arrays.copyOf(content.toArray(), content.toArray().length, String[].class);
|
||||||
|
|
||||||
writeFile(fileName, strArr);
|
writeFile(fileName, strArr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue