Giter Club home page Giter Club logo

pokerodds's Introduction

Poker Odds API

Poker Odds API is an example API built using ASP.NET OWIN. Given a Texas Holdem Poker hand (and optionally the community cards) it will calculate the odds of winning.

How It Works

Poker Odds uses the excellent PokerHandEval code written by Keith Rule (based in turn on the poker-eval library). Users of the API submit information on their hand, and get back information on the possible outcomes of the game.

Cards are submitted as a sequence of two character codes separated by spaces. For example, to specify that your pocket cards are the two of diamonds and the queen of clubs, you would pass "2d qc" as the pocket parameter. If you wanted to pass 7 Hearts, Ace of Spades and 10 Hearts as the board, you would specify this as "7h as th". Note that the character "t" indicates 10.

Live Demo

A live demo of the API is hosted at http://pokerodds.azurewebsites.net/

Example

Requesting the following URL:

http://pokerodds.azurewebsites.net/?pocket=2d%20qc&board=7h%20as%20th

Results in the response:

{
	"Pocket" : "2d qc",
	"Board" : "7h as th",
	"Outcomes" : [{
			"HandType" : "HighCard",
			"WinChance" : 0.070544587970861425
		}, {
			"HandType" : "Pair",
			"WinChance" : 0.18659517426273459
		}, {
			"HandType" : "TwoPair",
			"WinChance" : 0.0509451079156173
		}, {
			"HandType" : "Trips",
			"WinChance" : 0.0087375091396539109
		}, {
			"HandType" : "Straight",
			"WinChance" : 0.013022991307173612
		}, {
			"HandType" : "Flush",
			"WinChance" : 0.0
		}, {
			"HandType" : "FullHouse",
			"WinChance" : 0.0
		}, {
			"HandType" : "FourOfAKind",
			"WinChance" : 0.0
		}, {
			"HandType" : "StraightFlush",
			"WinChance" : 0.0
		}
	],
	"OverallWinSplitChance" : 0.0,
	"Completed" : false
}

Technology Used

  • ASP.NET OWIN

pokerodds's People

Contributors

sneakybrian avatar

Stargazers

 avatar Nelson Jimenez avatar Danny Garcia avatar Moshe Lieberman avatar Jonathan Kelley avatar

Watchers

James Cloos avatar  avatar

pokerodds's Issues

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.