test
This commit is contained in:
parent
84d0a890b7
commit
853f578a7d
|
|
@ -301,20 +301,7 @@ public class Simulator extends Thread {
|
||||||
* @param chanceOfLife the chance for each cell
|
* @param chanceOfLife the chance for each cell
|
||||||
* to be alive in new state
|
* to be alive in new state
|
||||||
*/
|
*/
|
||||||
public ArrayList<String> getRule() { //to check
|
|
||||||
ArrayList<String> rule = new ArrayList<>();
|
|
||||||
for (int i = 0; i < getHeight(); i++) {
|
|
||||||
StringBuilder lineState = new StringBuilder();
|
|
||||||
for (int j = 0 ; j < getHeight() ; j++) {
|
|
||||||
lineState.append(getCell(i, j));
|
|
||||||
if (j < getWidth() - 1) {
|
|
||||||
lineState.append(";");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
rule.add(lineState.toString());
|
|
||||||
}
|
|
||||||
return rule;
|
|
||||||
}
|
|
||||||
public void generateRandom(float chanceOfLife) {
|
public void generateRandom(float chanceOfLife) {
|
||||||
//TODO : complete method
|
//TODO : complete method
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue