The cl-poker-eval Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-poker-eval Reference Manual

This is the cl-poker-eval Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 03:57:39 2022 GMT+0.

Table of Contents


1 Introduction

cl-poker-eval

Pure common lisp 7 card poker hand evaluation. Evaluation based on pokersource.

Loadable via quicklisp.

* (ql:quickload "cl-poker-eval")

cl-poker-eval uses the following enumeration for card values:

2c-Ac = 0-12  
2d-Ad = 13-25  
2h-Ah = 26-38  
2s-As = 39-51  

You can use eval-hand-var to evaluate hands with 5 to 7 cards, or eval-hand-7 to evaluate a 7 card hand only. For example, to get the value of 7 cards in a list you could do the following:

(defvar *hand* '(1 2 3 4 5 6 7)) ;this would be the hand 3c 4c 5c 6c 7c 8c 9c  
(apply #'cl-poker-eval:eval-hand-var *hand*)  

You could also call eval-hand-* functions with the cards values you want to evaluate, like so:

(cl-poker-eval:eval-hand-7 1 2 3 4 5 6 7)  
(cl-poker-eval:eval-hand-var 3 4 5 6 7)  

Values returned by eval-hand-* integers representing the strength of a hand. High values are stronger hands.


2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-poker-eval

7-card hand poker evaluator

Author

Jason Person

License

BSD

Version

0.1

Source

cl-poker-eval.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.1 cl-poker-eval/cl-poker-eval.asd

Source

cl-poker-eval.asd.

Parent Component

cl-poker-eval (system).

ASDF Systems

cl-poker-eval.


3.1.2 cl-poker-eval/package.lisp

Source

cl-poker-eval.asd.

Parent Component

cl-poker-eval (system).

Packages

cl-poker-eval.


3.1.3 cl-poker-eval/cl-poker-eval.lisp

Dependencies
Source

cl-poker-eval.asd.

Parent Component

cl-poker-eval (system).

Public Interface
Internals

3.1.4 cl-poker-eval/top-5-cards-tbl.lisp

Dependencies
Source

cl-poker-eval.asd.

Parent Component

cl-poker-eval (system).

Internals

*top-five-cards-tbl* (special variable).


3.1.5 cl-poker-eval/straight-tbl.lisp

Dependencies
Source

cl-poker-eval.asd.

Parent Component

cl-poker-eval (system).

Internals

*straight-table* (special variable).


3.1.6 cl-poker-eval/top-card-tbl.lisp

Dependencies
Source

cl-poker-eval.asd.

Parent Component

cl-poker-eval (system).

Internals

*top-card-tbl* (special variable).


3.1.7 cl-poker-eval/poker-defs.lisp

Dependency

package.lisp (file).

Source

cl-poker-eval.asd.

Parent Component

cl-poker-eval (system).

Internals

3.1.8 cl-poker-eval/nbits-tbl.lisp

Dependency

package.lisp (file).

Source

cl-poker-eval.asd.

Parent Component

cl-poker-eval (system).

Internals

*nbits-tbl* (special variable).


3.1.9 cl-poker-eval/hands.lisp

Dependency

package.lisp (file).

Source

cl-poker-eval.asd.

Parent Component

cl-poker-eval (system).

Internals

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 cl-poker-eval

Provides interface for evaluating 7-card poker hands

Source

package.lisp.

Use List
  • asdf/interface.
  • common-lisp.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


5.1.1 Ordinary functions

Function: eval-hand-7 ()
Package

cl-poker-eval.

Source

cl-poker-eval.lisp.

Function: eval-hand-var ()
Package

cl-poker-eval.

Source

cl-poker-eval.lisp.


5.2 Internals


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.1 Constants

Constant: +clubs-mask+

For masking out all clubs in a hand

Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +diamonds-mask+

For masking out all diamonds in a hand

Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-card-mask+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-card-width+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-cards-mask+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-cards-shift+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-fifth-card-mask+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-fifth-card-shift+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-flush+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-fourth-card-mask+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-fourth-card-shift+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-fullhouse+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-handtype-mask+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-handtype-shift+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-nopair+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-onepair+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-quads+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-second-card-mask+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-second-card-shift+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-stflush+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-straight+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-third-card-mask+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-third-card-shift+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-top-card-mask+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-top-card-shift+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-trips+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +handval-twopair+
Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +hearts-mask+

For masking out all hearts in a hand

Package

cl-poker-eval.

Source

poker-defs.lisp.

Constant: +spades-mask+

For masking out all spades in a hand

Package

cl-poker-eval.

Source

poker-defs.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.2 Special variables

Special Variable: *nbits-tbl*
Package

cl-poker-eval.

Source

nbits-tbl.lisp.

Special Variable: *straight-table*
Package

cl-poker-eval.

Source

straight-tbl.lisp.

Special Variable: *top-card-tbl*
Package

cl-poker-eval.

Source

top-card-tbl.lisp.

Special Variable: *top-five-cards-tbl*
Package

cl-poker-eval.

Source

top-5-cards-tbl.lisp.


5.2.3 Macros

Macro: handtype-topcard-value (hv tpc)
Package

cl-poker-eval.

Source

cl-poker-eval.lisp.

Macro: str-strflush-value (dups rank &rest suit-masks)
Package

cl-poker-eval.

Source

cl-poker-eval.lisp.


Previous: , Up: Internals   [Contents][Index]

5.2.4 Ordinary functions

Function: eval-fullhouse ()
Package

cl-poker-eval.

Source

cl-poker-eval.lisp.

Function: eval-hand ()
Package

cl-poker-eval.

Source

cl-poker-eval.lisp.

Function: eval-quads ()
Package

cl-poker-eval.

Source

cl-poker-eval.lisp.

Function: eval-trips ()
Package

cl-poker-eval.

Source

cl-poker-eval.lisp.

Function: eval-twopair ()
Package

cl-poker-eval.

Source

cl-poker-eval.lisp.

Function: eval-twopair-2 ()
Package

cl-poker-eval.

Source

cl-poker-eval.lisp.

Function: get-cards (hand)
Package

cl-poker-eval.

Source

hands.lisp.

Function: get-high-card ()
Package

cl-poker-eval.

Source

poker-defs.lisp.

Function: get-top-card ()
Package

cl-poker-eval.

Source

poker-defs.lisp.

Function: handval-fifth-card-value ()
Package

cl-poker-eval.

Source

poker-defs.lisp.

Function: handval-fourth-card-value ()
Package

cl-poker-eval.

Source

poker-defs.lisp.

Function: handval-handtype-value ()
Package

cl-poker-eval.

Source

poker-defs.lisp.

Function: handval-second-card-value ()
Package

cl-poker-eval.

Source

poker-defs.lisp.

Function: handval-third-card-value ()
Package

cl-poker-eval.

Source

poker-defs.lisp.

Function: handval-top-card-value ()
Package

cl-poker-eval.

Source

poker-defs.lisp.

Function: make-cards-masks (&rest cards)
Package

cl-poker-eval.

Source

hands.lisp.

Function: make-hand-var (&rest cards)
Package

cl-poker-eval.

Source

hands.lisp.


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   E   F   G   H   M   S  
Index Entry  Section

E
eval-fullhouse: Private ordinary functions
eval-hand: Private ordinary functions
eval-hand-7: Public ordinary functions
eval-hand-var: Public ordinary functions
eval-quads: Private ordinary functions
eval-trips: Private ordinary functions
eval-twopair: Private ordinary functions
eval-twopair-2: Private ordinary functions

F
Function, eval-fullhouse: Private ordinary functions
Function, eval-hand: Private ordinary functions
Function, eval-hand-7: Public ordinary functions
Function, eval-hand-var: Public ordinary functions
Function, eval-quads: Private ordinary functions
Function, eval-trips: Private ordinary functions
Function, eval-twopair: Private ordinary functions
Function, eval-twopair-2: Private ordinary functions
Function, get-cards: Private ordinary functions
Function, get-high-card: Private ordinary functions
Function, get-top-card: Private ordinary functions
Function, handval-fifth-card-value: Private ordinary functions
Function, handval-fourth-card-value: Private ordinary functions
Function, handval-handtype-value: Private ordinary functions
Function, handval-second-card-value: Private ordinary functions
Function, handval-third-card-value: Private ordinary functions
Function, handval-top-card-value: Private ordinary functions
Function, make-cards-masks: Private ordinary functions
Function, make-hand-var: Private ordinary functions

G
get-cards: Private ordinary functions
get-high-card: Private ordinary functions
get-top-card: Private ordinary functions

H
handtype-topcard-value: Private macros
handval-fifth-card-value: Private ordinary functions
handval-fourth-card-value: Private ordinary functions
handval-handtype-value: Private ordinary functions
handval-second-card-value: Private ordinary functions
handval-third-card-value: Private ordinary functions
handval-top-card-value: Private ordinary functions

M
Macro, handtype-topcard-value: Private macros
Macro, str-strflush-value: Private macros
make-cards-masks: Private ordinary functions
make-hand-var: Private ordinary functions

S
str-strflush-value: Private macros

Jump to:   E   F   G   H   M   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *   +  
C   S  
Index Entry  Section

*
*nbits-tbl*: Private special variables
*straight-table*: Private special variables
*top-card-tbl*: Private special variables
*top-five-cards-tbl*: Private special variables

+
+clubs-mask+: Private constants
+diamonds-mask+: Private constants
+handval-card-mask+: Private constants
+handval-card-width+: Private constants
+handval-cards-mask+: Private constants
+handval-cards-shift+: Private constants
+handval-fifth-card-mask+: Private constants
+handval-fifth-card-shift+: Private constants
+handval-flush+: Private constants
+handval-fourth-card-mask+: Private constants
+handval-fourth-card-shift+: Private constants
+handval-fullhouse+: Private constants
+handval-handtype-mask+: Private constants
+handval-handtype-shift+: Private constants
+handval-nopair+: Private constants
+handval-onepair+: Private constants
+handval-quads+: Private constants
+handval-second-card-mask+: Private constants
+handval-second-card-shift+: Private constants
+handval-stflush+: Private constants
+handval-straight+: Private constants
+handval-third-card-mask+: Private constants
+handval-third-card-shift+: Private constants
+handval-top-card-mask+: Private constants
+handval-top-card-shift+: Private constants
+handval-trips+: Private constants
+handval-twopair+: Private constants
+hearts-mask+: Private constants
+spades-mask+: Private constants

C
Constant, +clubs-mask+: Private constants
Constant, +diamonds-mask+: Private constants
Constant, +handval-card-mask+: Private constants
Constant, +handval-card-width+: Private constants
Constant, +handval-cards-mask+: Private constants
Constant, +handval-cards-shift+: Private constants
Constant, +handval-fifth-card-mask+: Private constants
Constant, +handval-fifth-card-shift+: Private constants
Constant, +handval-flush+: Private constants
Constant, +handval-fourth-card-mask+: Private constants
Constant, +handval-fourth-card-shift+: Private constants
Constant, +handval-fullhouse+: Private constants
Constant, +handval-handtype-mask+: Private constants
Constant, +handval-handtype-shift+: Private constants
Constant, +handval-nopair+: Private constants
Constant, +handval-onepair+: Private constants
Constant, +handval-quads+: Private constants
Constant, +handval-second-card-mask+: Private constants
Constant, +handval-second-card-shift+: Private constants
Constant, +handval-stflush+: Private constants
Constant, +handval-straight+: Private constants
Constant, +handval-third-card-mask+: Private constants
Constant, +handval-third-card-shift+: Private constants
Constant, +handval-top-card-mask+: Private constants
Constant, +handval-top-card-shift+: Private constants
Constant, +handval-trips+: Private constants
Constant, +handval-twopair+: Private constants
Constant, +hearts-mask+: Private constants
Constant, +spades-mask+: Private constants

S
Special Variable, *nbits-tbl*: Private special variables
Special Variable, *straight-table*: Private special variables
Special Variable, *top-card-tbl*: Private special variables
Special Variable, *top-five-cards-tbl*: Private special variables

Jump to:   *   +  
C   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   F   H   N   P   S   T  
Index Entry  Section

C
cl-poker-eval: The cl-poker-eval system
cl-poker-eval: The cl-poker-eval package
cl-poker-eval.asd: The cl-poker-eval/cl-poker-eval․asd file
cl-poker-eval.lisp: The cl-poker-eval/cl-poker-eval․lisp file

F
File, cl-poker-eval.asd: The cl-poker-eval/cl-poker-eval․asd file
File, cl-poker-eval.lisp: The cl-poker-eval/cl-poker-eval․lisp file
File, hands.lisp: The cl-poker-eval/hands․lisp file
File, nbits-tbl.lisp: The cl-poker-eval/nbits-tbl․lisp file
File, package.lisp: The cl-poker-eval/package․lisp file
File, poker-defs.lisp: The cl-poker-eval/poker-defs․lisp file
File, straight-tbl.lisp: The cl-poker-eval/straight-tbl․lisp file
File, top-5-cards-tbl.lisp: The cl-poker-eval/top-5-cards-tbl․lisp file
File, top-card-tbl.lisp: The cl-poker-eval/top-card-tbl․lisp file

H
hands.lisp: The cl-poker-eval/hands․lisp file

N
nbits-tbl.lisp: The cl-poker-eval/nbits-tbl․lisp file

P
Package, cl-poker-eval: The cl-poker-eval package
package.lisp: The cl-poker-eval/package․lisp file
poker-defs.lisp: The cl-poker-eval/poker-defs․lisp file

S
straight-tbl.lisp: The cl-poker-eval/straight-tbl․lisp file
System, cl-poker-eval: The cl-poker-eval system

T
top-5-cards-tbl.lisp: The cl-poker-eval/top-5-cards-tbl․lisp file
top-card-tbl.lisp: The cl-poker-eval/top-card-tbl․lisp file

Jump to:   C   F   H   N   P   S   T