What does this logic do? Could it not just be replaced with `Math.floor(Math.random() * 8) === 0`?