aterribleidea.com

These scripts are for demonstration purposes only. They were written for a series at IBM developerWorks. A link to the series will be added when the series has been published. You can get the source code for all these scripts in the article

Part 1 : A Basic Die Roller - Random Name Generator - Scenario Generator - Deck Shuffler - Odds Calculator : Card Draw
             Simple Poker Dealer - Hangman Generator - Crossword Helper - Mad Libber - Lotto Picker

Part 2 : Damage Calculator - Stat Tracker - NPC Generator - Odds Calculator : Die Roll - Simple Blackjack Dealer
             Card Counter - Bingo Engine - Jumble Helper - Substitution Cyphers - Word Search Generator

Part 3 : Inventory Management - Note Taker - ID Card Generator - Map Generator - Poker Hand Evaluator
             Slot Machine - Keno - Cryptogram Helper - Mastermind - Word Chains


I have generated a deck of 52 cards, and drawn two hands :

Hand 1 : Three of Spades, King of Diamonds, Ace of Hearts, Jack of Spades, King of Clubs
Hand 2 : Eight of Spades, Jack of Clubs, Six of Clubs, Ace of Clubs, Seven of Spades

Here are the odds of drawing the Ace of Spades, Any Spade, or Any Ace from the remaining cards :

Ace of Spades : 1 in 42
of Spades : 9 in 42
Ace of : 2 in 42