magento2 – Generate Random numbers for multiple block call

I am trying to implement custom flash toy for website. To do this I have created custom module.

In custom module, I have created a block class. Block class contain the function to generate the Random digits.

Here is my block's Class Name:  WM_Jackson/Block/Index/Index

Random Id generator code in block:

/**
 * generate random number for player
 *
 * @return int
 */

public function playeridGenerator()
{   
     $ran = rand(10, 999999);
    return $ran;
}

This rando Id generator code works fine when I call my block in cms page using below code:

{{block class="WMJacksonBlockIndexIndex" template="WM_Jackson::flash_elem.phtml" }}

But when I add multiple blocks on the same page, it generates the duplicate ids for all the blocks.

for example if I add block code 3 times, It shows flash player 3 times but it shows same id for 3players. Hence when user try to interact with Flash show, only first player works.

  {{block class="WMJacksonBlockIndexIndex" template="WM_Jackson::flash_elem.phtml" }}
  {{block class="WMJacksonBlockIndexIndex" template="WM_Jackson::flash_elem.phtml" }}
  {{block class="WMJacksonBlockIndexIndex" template="WM_Jackson::flash_elem.phtml" }}

Above code renders output 3 times but block function playeridGenerator() is generating same number 3 times.

How can I generate Random numbers when calling blocks multiple times? Is there any native library in magento for this?

Any help would be appreciated.