use non defaut constructor

This commit is contained in:
histausse 2021-05-16 12:16:23 +02:00
parent f6fa2759a6
commit 38933c4a49
Signed by: histausse
GPG key ID: 67486F107F62E9E9

View file

@ -9,7 +9,7 @@ const ALIVE_COLOR = "#FFFFFF";
const seed = Math.random();
const universe = ((seed) => {
if (seed < 1/3) return Universe.new();
if (seed < 1/3) return Universe.new_modulo();
else if (seed < 2/3) return Universe.new_random();
else return Universe.new_space_ship();
})(seed);