The game simulates real coin flip and guess the result, which is completely built by smart contracts based on blockchain, so no one can cheat on the result, it's pure fairness. If you are familiar with smart contract technology, you could also play by directly accessing our contract address.
The player must select at least one and no more than five coins to play, choose head or tail on each coin, and the results of each coin are revealed in sequence; the player must correctly guess which side of each coin is up to win. Various coin counts correspond to different odds, with the highest having up to 32 odds.
For example, a player selects two coins to play and chooses head for the first coin and tail for the second. So this is the list of all possible flipping results.
Case 3 appears to have the same result as the player chose, one for head and one for tail, but the order is incorrect, so the game is still lost.
When a player wins, the system deducts 3.5% of the reward as a maintenance fee.
Step.1 Click the transaction in My Flips
Step.2 Select the logs tab and scroll down
Step.3 Get the random number from Chain Link VRF
Step.4 Compare the choice with random number
Coin Flip stores the choices in binary, 0 for Head and 1 for Tail. For example, if you choose two coins to flip, the first is Head and the second is Tail, your choice will be converted to a number, which is 2 in DEC and 00010 in BINARY, so the formula for comparison with a random number is:
So it is: