Code Monkey home page Code Monkey logo

poker-calculator's Introduction

Poker Calculator

This is a simple program that calculates probable outcomes for a hand of Texas Hold 'Em poker.

The program can accept information regarding the community cards at various stages of the hand (pre-flop, flop, turn, and river). It can also accept info about each player's (up to 10) hole cards.

The program will then calculate the odds of each outcome for each player.

File input format uses 2-character abbreviations to denote each card.

Suits:

  • s: Spades
  • h: Hearts
  • d: Diamonds
  • c: Clubs

Ranks:

  • A: Ace
  • K: King
  • Q: Queen
  • J: Jack
  • T: Ten
  • 9
  • 8
  • 7
  • 6
  • 5
  • 4
  • 3
  • 2

The first line of the file describes the community cards. An empty first line equates to pre-flop. Successive lines describe a player's hole cards.

Example:

5d 8c Ah Qh
7h 2c
Ac Kd
5s 5c

This is the "turn" phase with community cards:

  • 5 of Diamonds
  • 8 of Clubs
  • Ace of Hearts
  • Queen of Hearts

Player 1's hole cards:

  • 7 of Hearts
  • 2 of Clubs

Player 2's hole cards:

  • Ace of Clubs
  • King of Diamonds

Player 3's hole cards:

  • 5 of Spades
  • 5 of Clubs

Upon completion, the program will print out the various outcomes and their probabilities for each player.

Build instructions

See BUILDING.md.

poker-calculator's People

Contributors

alex-knowles avatar

Stargazers

Michel Mansour avatar

Watchers

James Cloos avatar Alex Knowles avatar Michel Mansour avatar

Forkers

michelmansour

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.