Skip to content

johnnyyliang/Poker-Equity-Calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poker Equity Calculator

A web-based poker equity calculator that simulates Texas Hold'em hands to determine winning probabilities. This application allows users to select two poker hands and calculates their respective chances of winning through Monte Carlo simulation.

Features

  • Interactive web interface with playing card emojis for card selection
  • Visual poker table background
  • Monte Carlo simulation with 10,000 iterations per calculation
  • Supports full range of poker hand rankings:
    • Royal Flush
    • Straight Flush
    • Four of a Kind (Quads)
    • Full House
    • Flush
    • Straight
    • Three of a Kind (Trips)
    • Two Pair
    • One Pair
    • High Card

Prerequisites

  • Python 3.x
  • Flask

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/poker-equity-calculator.git
cd poker-equity-calculator
  1. Install required dependencies:
pip install flask

Project Structure

  • app.py - Main Flask application file with routes and emoji-to-card mapping
  • cardclass.py - Card class implementation
  • deckclass.py - Deck class for managing the card deck
  • handclass.py - Hand class with poker hand evaluation logic
  • simulation.py - Monte Carlo simulation implementation
  • templates/index.html - Main web interface template
  • static/styles.css - CSS styling for the web interface
  • static/images/Table.jpg - Poker table background image

Usage

  1. Start the Flask server:
python app.py
  1. Open a web browser and navigate to http://127.0.0.1:5000

  2. Select cards for both hands using the dropdown menus

  3. Click "Simulate" to calculate equity percentages

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published