We’re excited to announce that we’re releasing Fortune double game (Room 1) in Blaze , so we welcome you to our seeding event for Fortune double which we would be releasing soon. For this seeding event we are following the same approach we had for Crash, Slide and Double.
As part of our fairness we generated a chain of 10,000,000 SHA256 hashes where each hash is the hash of the hexadecimal representation of the previous hash. Being the last hash in the chain: d28e7aed46149e63ec8e2c95b4e829327f59b7dff56539cd232544904827dc35
Script to calculate Fortune double roll:
Code
const ROULETTE_TILES = [
{ number: 0, color: 'white' },
{ number: 11, color: 'black' },
{ number: 5, color: 'red' },
{ number: 10, color: 'black' },
{ number: 6, color: 'red' },
{ number: 9, color: 'black' },
{ number: 7, color: 'red' },
{ number: 8, color: 'black' },
{ number: 1, color: 'red' },
{ number: 14, color: 'black' },
{ number: 2, color: 'red' },
{ number: 13, color: 'black' },
{ number: 3, color: 'red' },
{ number: 12, color: 'black' },
{ number: 4, color: 'red' },
];
module.exports.getColorByRoll = (roll) => {
return ROULETTE_TILES.find((t) => t.number === roll).color;
};
const getWhiteMultiplierFromHash = (hash) => {
let h = parseInt(hash.slice(0, 52 / 4), 16);
let e = Math.pow(2, 52);
let multiplier = Math.floor((100 * e - h) / (e - h)) / 100 + 7.5;
multiplier = Math.max(8.5, Math.min(multiplier, 250));
return +multiplier.toFixed(2);
};
module.exports.getRollFromHash = (hash) => {
const integ = parseInt(hash, 16);
const MAX_RANGE = Math.pow(2, 256);
const randval = integ / MAX_RANGE;
const n = Math.floor(randval * 15);
const tile = ROULETTE_TILES.find((t) => t.number === n);
let color, multiplier;
switch (tile.color) {
case 'white':
color = 0;
multiplier = getWhiteMultiplierFromHash(hash);
break;
case 'black':
color = 2;
multiplier = 2;
break;
case 'red':
color = 1;
multiplier = 2;
break;
}
return {
n: n,
multiplier: multiplier,
color: color,
};
};
We’re gonna be using a BlockHash that hasn’t been mined at the time of this post, we’re expecting to use Bitcoin block 820749, this to prove we have no influence over the outcome of the game. Please guys feel free to quote this post so this will be all set in stone.
Looking forward to show you guys Fortune double very soon!