Merge branch 'master' of https://gitarero.ecam.fr/laure.bel/OOP_F3_Project.git
This commit is contained in:
commit
a3e8ab56dd
|
|
@ -1,5 +1,6 @@
|
|||
package backend;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
import windowInterface.MyInterface;
|
||||
|
|
@ -309,6 +310,12 @@ public class Simulator extends Thread {
|
|||
* maybe just make a constructor in there
|
||||
* and use it here
|
||||
*/
|
||||
Random rand = new Random();
|
||||
for (int x = 0; x < COL_NUM; x++) {
|
||||
for (int y = 0; y < LINE_NUM; y++) {
|
||||
world[x][y] = rand.nextFloat() < chanceOfLife ? 1 : 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isLoopingBorder() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue