Hash Blackjack

Every block represents a card.

The blockchain transaction hash value is hexadecimal.

Hexadecimal (or hex) is a base 16 system used to simplify how binary is represented. A hex digit can be any of the following 16 digits: 0 1 2 3 4 5 6 7 8 9 A B C D E F. Each hex digit reflects a 4-bit binary sequence.

Hash BlackJack takes 2 digits from the blockchain hash to calculate the card.

Rank Digit: From right to left, the first digit that has the valid value:

Ace (1), 2, 3 , 4 , 5 , 6, 7 , 8, 9 , 10, Jack (b), Queen (c), King (d)

Color Digit: The digit left to Rank Digit for calculating the 4 colors: Clubs (0), Diamonds (1), Hearts (2), Spades (3)

How to calculate the 13 Ranks:

BetHash will find last qualified hexadecimal value in the transaction hash.

A qualified hexadecimal value: 1 to 9, a, b, c, d, 13 numbers in total.

Ace (1), 2, 3 , 4 , 5 , 6, 7 , 8, 9 , 10, Jack (b), Queen (c), King (d)

Other values: 0, e, f will be skipped. For example:

How to calculate the 4 colors:

One digit before the Rank Digit, is the Color Digit: BetHash does a mode calculation of the hex value to get a result between 0 and 3.

For example:

a (hex) --> 10 (decimal) % 4 --> 2 (Hearts)

b (hex) --> 11 (decimal) % 4 --> 3 (Spades)

0 (hex) --> 0 (decimal) % 4 --> 0 (Clubs)

How the Blocks are decided

Action Block: in which your action transaction is sent to the blockchain.

Card Blocks: 1 block after the action block. The number of card blocks depends on what kind of action the player chooses.

Game Flow

Right after the betting block X, the following 3 blocks will send 3 cards in the following orders:

X+1, X+3: two cards for player

X+ 2: one card for dealer

If players choose to split at Block X, Block X+1 and Block X+2 will send 2 more cards to players.

If player chooses to hit at Block X, Block X+1 will send 1 more card to players.

If player chooses to stand at Block X, Block X+1, X+2 ... will send card to dealer until dealer reaches more than 17.

BlackJack Game Rules

Ace: can be used as 1 or 11.

2 -10: face value

J - K: 10

BlackJack: Initial Hand of an Ace and any 10 point card

double: can double with a initial hand of 9, 10, 11

surrender: late surrender

Split: no split on aces

Dealer hits on soft 17.

Payout

Player BlackJack pays 6:5

Insurance pays 2:1

Player beats dealer pays 1:1

Last updated