Dice that protects you from time travelers!
Imagine a simple coin. Is it possible to always get heads? Yes! Well.. if you can time travel of course, just travel back and re-roll until you get heads(in computer gaming it's called save scumming), continue ad infinitum.
To solve this problem (un)fair dice was invented! It keeps track of every roll and adjusts outcomes based on previous rolls. Time traveller will die of old age trying to scam this!
const createCoin = ;const coin = ; // or createDice(2)console; // 0 or 1
or using array:
const createDice = ;const coin = ;console; // heads or tails
or create a d6:
const createDice = ;const d6 = ;console; // 0, 1, 2, 3, 4 or 5
const createDice createFromState = ;const d6 = ;d6;// ...const saveState = d6; // save it somewhere as json, etc..const d6Clone = ; // recover it from state