An poker game which provides a predetermined outcome to a player. In one
embodiment, a plurality of playing cards are provided to a player wherein
one or more of the provided playing cards are based on the predetermined
game outcome. The player is enabled to select one or more of the
initially dealt playing cards to hold or to discard. If a poker hand with
an associated payout equal to the value associated with the predetermined
game outcome may be obtained based on the held cards, the gaming device
utilizes one or more backfill algorithms, to determine which card or
cards, if any, need to be dealt to the player. The determined cards are
provided to the player to replace the playing cards designated by the
player to discard and the selected predetermined game outcome which is
associated with a value equal to the payout of the player's poker hand is
provided to the player. If a poker hand with an associated payout equal
to the value associated with the selected predetermined game outcome
cannot be obtained by the player based on the playing cards held by the
player, a subset of the held cards is selected and one or more backfill
algorithms are used to determine which cards need to be dealt to the
player. The discarded playing cards and at least one held playing card
are replaced with the determined card. The selected predetermined game
outcome which is associated with a value equal to the payout of the
player's poker hand is then provided to the player.