#poker #cards

pokereval

A Rust library for evaluating poker hands with 5 or 7 cards

3 releases

Uses old Rust 2015

0.1.2 Dec 18, 2015
0.1.1 Jul 6, 2015
0.1.0 Jul 6, 2015

#1509 in Algorithms

Download history 5/week @ 2024-02-18 41/week @ 2024-02-25 6/week @ 2024-03-03 5/week @ 2024-03-10

57 downloads per month
Used in 2 crates

MIT license

64KB
287 lines

#pokereval-rs

A Rust library, implementating a poker hand evaluator. Based on the original work by Kevin Suffecool (aka Cactus Kev).

The method based on optimizations contributed by Paul D. Senzee's with his hashing based Optimized Hand Evaluator is currently not functional (tries to access out-of-bounds array values) and has been disabled while the code still remains in src/perfect.rs.

The crate is called pokereval and you can depend on it via cargo:

[dependencies.pokereval]
git = "https://github.com/th4t/pokereval-rs.git"

Cargo Bench

Does not work right now in stable rust 1.5. Don't expect it to work :)


lib.rs:

pokereval-rs currently contains a single way of evaluating poker hands (5,6 or 7 cards) to a HandRank, which is a number from 0 to 7461 inclusive, the higher the better the hand. Inside the modules, there are more efficient methods that don't need to convert cards to internal representations first.

Dependencies

~325–550KB