add two simple scroll panes to represent environment and ant brain

This commit is contained in:
2019-12-09 01:09:34 +01:00
parent db9b62236c
commit c11cc2c3f2
6 changed files with 142 additions and 8 deletions
+9 -4
View File
@@ -3,10 +3,10 @@ package core;
import java.util.Random;
public class RNG {
private static final Random rng;
private static final int SEED = 123;
private static Random rng;
private static int seed = 123;
static {
rng = new Random(SEED);
rng = new Random(seed);
}
public static Random getRandom() {
@@ -14,6 +14,11 @@ public class RNG {
}
public static void reseed(){
rng.setSeed(SEED);
rng.setSeed(seed);
}
public static void setSeed(int seed){
RNG.seed = seed;
rng.setSeed(seed);
}
}