Casino game:
In this program, the user starts out with $100 and is prompted with what casino game they would like to play. Option 1) Lucky Seven: In this game, the user is prompted to pick whether a random number is going to be above, below, or equal to 7, and to enter their bet. They win $2 if they guess right, but if they guess that the number will be 7 and it is, the user wins double their bet. If they guess wrong, they lose their bet. Option 2) Even Odd: In this game the user is prompted to guess whether a random number will be even or odd, and to enter their bet. If they guess right, they are awarded double their bet, and if they guess wrong, they lose their bet. Option 3) Guess A Number: In this game the user is prompted to pick a number between 2 and 12, and to place a bet. If the user guesses the number correctly, they win double their bet, and if they lose, they lose their bet. The game is also terminated if the user goes bankrupt.
Garden Attack game:
Garden Attack C source.txt
In this program, the user starts out with a blank garden, and is prompted with what flower to plant. The options are a Mundane Marigold, a Bomb Blossom, and a Radiant Rose. The garden is comprised of 2/3 poor soil and 1/3 good soil. If the Mundane marigold is planted in poor soil, the user is awarded one point. If it is planted in good soil, the user is awarded two points. If the Bomb Blossom is planted in poor soil, there is a 1/3 change that it will blow up and kill all the flowers within a one-square-radius, and if any flowers are destroyed when it blows up, the user is deducted one point for each dead flower. If the Bomb Blossom is planted in good soil, there is a 1/2 chance that a bug will attack it. If the bug attacks, the flower dies and the user is awarded zero points, but if the flower blossoms, the user is awarded 5 points. If the Radiant Rose is planted in poor soil, there is a 1/2 chance that it will die, and if it doesn't the user is awarded two points. If it is planted in good soil, however, there is a 2/3 chance that a bug will attack. If the bug attacks, the flower dies and the user does not receive any points, but if it blossoms, the user is awarded ten points. The game goes on for five turns, and the object is to get the highest score possible.