Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
populateEnemies () {
for (let i=0; i<=3; i++) {
const enemy = new Enemy();
enemy.x = Math.random() * 2;
enemy.y = Math.random() * 2;
this.state.entities[generateId()] = enemy;
}
}