Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samwho/poker-hand-analyser
A Ruby library for analysing poker hands.
https://github.com/samwho/poker-hand-analyser
Last synced: about 2 months ago
JSON representation
A Ruby library for analysing poker hands.
- Host: GitHub
- URL: https://github.com/samwho/poker-hand-analyser
- Owner: samwho
- Created: 2011-08-11T18:47:05.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-08-11T18:47:27.000Z (over 13 years ago)
- Last Synced: 2024-10-13T20:41:57.162Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 93.8 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a poker hand analysis library. It's still very much a work in
progress so bear with me and report any bugs if you find them :)# Usage
``` ruby
hand = Hand.new "2C 2H 10D 10S AS"
hand.pairs #=> [["2C", "2H], ["10D", "10S"]]
hand.flushes #=> []
hand.trips #=> []
```While you construct a hand with a string, the arrays returned from methods
like .trips and .pairs are arrays of Card objects.# TODO
- Flesh out this README
- Give hands ranks so that they can be compared to other hands and a
"winner" determined.
- Write more specs.