MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / shouldSpawn

Function shouldSpawn

assets/js/block_ninja.js:332–334  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

330 const cooldown = makeCooldown(cooldownPerSpawn, maxSpawns);
331 return {
332 shouldSpawn() {
333 return Math.random() <= chance && cooldown.useIfAble();
334 },
335 mutate(options) {
336 if (options.chance) chance = options.chance;
337 cooldown.mutate({

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected