Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Card Hand Odds Calculator

This project is a web application that calculates the odds of drawing a specific hand from a deck of cards based on user-defined requirements.

Files

  • calculator.html: The main HTML file that contains the user interface.
  • calculator.js: The JavaScript file that contains the logic for calculating the odds.
  • calculator.css: The CSS file for styling the user interface.
  • README.md: This file, which provides an overview of the project and instructions for usage.
  • TODO.md: A file that lists the tasks and features to be implemented.

Usage

  1. Open the Application:

    • Open calculator.html in a web browser.
  2. Set Options:

    • Select the deck size (52 cards or 54 cards with jokers).
    • Enter the hand size (number of cards in the hand).
  3. Add Requirements:

    • Select the type of requirement (e.g., Same Rank, Same Suit, Same Color).
    • Specify the number of cards that should meet the requirement.
    • Optionally, specify a specific rank, suit, or color.
  4. Calculate Odds:

    • Click the "Calculate Odds" button to compute the probability of drawing a hand that meets the specified requirements.
    • The result will be displayed in the "Result" section.

Example

To calculate the odds of drawing a hand with two cards of the same rank from a standard 52-card deck:

  1. Set the deck size to 52 cards.
  2. Set the hand size to 5 cards.
  3. Add a requirement for 2 cards with the same rank.
  4. Click "Calculate Odds".

The result will be displayed as a percentage.

Development

To modify the project, edit the HTML, JavaScript, and CSS files as needed. The main logic for calculating the odds is implemented in calculator.js.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages