diff --git a/src/backend/Simulator.java b/src/backend/Simulator.java index fa6f2b4..f2c71d0 100644 --- a/src/backend/Simulator.java +++ b/src/backend/Simulator.java @@ -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() {