No commit activity in last 3 years
No release in over 3 years
Open Face Chinese Poker Statistics
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
>= 0
 Project Readme

Ofcp Card Counter

Statistics calculations for Open Face Chinese Poker hands

Basic Usage

Calculates the dependent probability of receiving one or more cards left in the deck.

@card_counter = OfcpCardCounter::CardCounter.new(
  :turns_left => 3, # Number of cards this player is yet to get
  :cards => %w{2H 3H 4H} # All cards that are already known and dealt
)
@card_counter.probability_of_getting 2, :of => %w{5H 6H}
#=> 0.002551020408163265


@card_counter = OfcpCardCounter::CardCounter.new(
  :turns_left => 10, # Number of cards this player is yet to get
  :cards => %w{4H JH QH} # All cards that are already known and dealt
)
@card_counter.probability_of_getting 2, :of => %w{2H 3H 5H 6H 7H 8H 9H 10H KH AH}
#=> 0.6647656110932596