Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
github.com/mattlangl/gophe
GOPHE is a Texas Hold'em Poker Hand Evaluator, inspired by HenryRLee's Poker Hand Evaluator and implemented in Go. This library efficiently handles poker hand evaluations for 5 to 7 card hands using a Perfect Hash Algorithm. The implementation makes use of pre-computed hash tables for rapid and efficient hand evaluation, suited for both casual use and high-performance applications.
To use GOPHE in your Go project, import the package and create a new hand with the desired cards. Then, use the EvaluateHand
or EvaluateCards
functions to get the rank of the hand.
package main
import (
"fmt"
"gophe"
)
func main() {
// Create a new hand
hand := gophe.NewHand(cards...)
// Evaluate the hand
rank := gophe.EvaluateHand(*hand)
fmt.Println("Hand Rank:", rank.DescribeRank())
}
Contributions to GOPHE are welcome. Please feel free to submit issues and pull requests to the repository.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.