It feels like in your situation, simply hashing some unique value would be a good pseudo-random number generator.
A snippet like this:
pragma solidity ^0.4.24;
contract Test {
uint nonce = 0;
function PRNG() public returns(uint) {
nonce += 1;
return uint(keccak256(abi.encodePacked(nonce, msg.sender, blockhash(block.number - 1))));
}
}
The main concern here would be that someone with enough computational power may be able to generate transactions and blocks which control this random number. For example, this user may be able to generate a transactions until they get the random number they want, and then they would need to mine that block and publish it before anyone else changes something. However, this would be a costly attack, so there would need to be something to gain from doing so.
Here is what the solidity documentation has to say:
Do not rely on block.timestamp, now and blockhash as a source of
randomness, unless you know what you are doing.
Both the timestamp and the block hash can be influenced by miners to
some degree. Bad actors in the mining community can for example run a
casino payout function on a chosen hash and just retry a different
hash if they did not receive any money.
In my snippet, we also include a nonce
and a msg.sender
to try and make it harder for such malicious actors. In this situation, each sender would have a unique set of hashes generated for their account, and the nonce
is a global variable which means it can be influenced by other people, making it harder to control by the malicious individual.