1
0
Fork 0

Balancing the odds

This commit is contained in:
Ethanell 2021-03-30 09:47:48 +02:00
parent d83b542ec4
commit a75ea3b161

View file

@ -237,7 +237,7 @@ export class Game {
lifeGenerator() { lifeGenerator() {
if (!this.world.find(v => v === tiles.LIFE) && !this.world.find(v => v === tiles.ORANGE)) { if (!this.world.find(v => v === tiles.LIFE) && !this.world.find(v => v === tiles.ORANGE)) {
if (this.lifeCooldown <= 0) { if (this.lifeCooldown <= 0) {
if (this.lives < 3 && Math.random() < 0.15) { if (this.lives < 3 && Math.random() < 0.05) {
let pos = this.randCoords(); let pos = this.randCoords();
this.world[pos[0]][pos[1]].type = tiles.LIFE; this.world[pos[0]][pos[1]].type = tiles.LIFE;