Rules of Video Poker

Video Poker is a popular casino game which is played against a slot machine.

The game starts with player putting an ante of his choice.
Once this is done, the player is dealt five cards face up. At this point the player can either keep all his cards, or replace any of them and then press Deal.
After that the discarded cards are replaced with randomly selected cards from the played deck. Then the resulting hand is evaluated and the payout is calculated.

If the hand is worse than two jacks, then the hand is lost and the ante bet is forfeited.

If the hand is jacks or better, but worse than two pair, then it's draw and the player keeps his ante (the payout is 1).

If the hand is two pair or better, then player wins and the payout is calculated by applying a coefficient determined by the player's hand rank.

For example:

Royal Flush x 250
Straight Flush x 50
Four of a kind x 25
Full House x 9
Flush x 6
Straight x 4
Three of a kindx 3
Two Pair x 2
Jacks or Betterx 1