Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/mattlangl/gophe

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/mattlangl/gophe

  • v0.0.0-20240117021521-d65a1ba156dc
  • Source
  • Go
  • Socket score

Version published
Created
Source

GOPHE: Go-Based Poker Hand Evaluator

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.

Features

  • Evaluates Texas Hold'em hands of 5-7 cards.
  • Utilizes a Perfect Hash Algorithm for fast and accurate results.
  • Pre-computed hash tables integrated for optimized performance.

Usage

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())
}

Contributing

Contributions to GOPHE are welcome. Please feel free to submit issues and pull requests to the repository.

FAQs

Package last updated on 17 Jan 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc