This commit is contained in:
Timéo 2024-05-29 16:47:31 +02:00
commit d569d9e9f3
2 changed files with 1 additions and 3 deletions

View File

@ -36,11 +36,9 @@ public class Rules {
if (row.size() <= 0) { if (row.size() <= 0) {
System.out.println("wrong file buddy, this one's empty"); System.out.println("wrong file buddy, this one's empty");
return;
}else if (surviveCells.length<=0) { }else if (surviveCells.length<=0) {
System.out.println("wrong file buddy, this one's does not have survival rules, won't work"); System.out.println("wrong file buddy, this one's does not have survival rules, won't work");
return;
}else { }else {
for (int x = 0; x < surviveCells.length; x++) { for (int x = 0; x < surviveCells.length; x++) {

View File

@ -360,7 +360,7 @@ public class Simulator extends Thread {
ArrayList<String> rule = new ArrayList<>(); ArrayList<String> rule = new ArrayList<>();
for (int i = 0; i < getHeight(); i++) { for (int i = 0; i < getHeight(); i++) {
StringBuilder lineState = new StringBuilder(); StringBuilder lineState = new StringBuilder();
for (int j = 0 ; j < getHeight() ; j++) { // je crois qu'il y a un probleme, il fau+t mettre getWidth je crois for (int j = 0 ; j < getWidth() ; j++) {
lineState.append(getCell(i, j)); lineState.append(getCell(i, j));
if (j < getWidth() - 1) { if (j < getWidth() - 1) {
lineState.append(";"); lineState.append(";");