The cl-poker-eval Reference Manual
Table of Contents
The cl-poker-eval Reference Manual
This is the cl-poker-eval Reference Manual, version 0.1,
generated automatically by Declt version 3.0 "Montgomery Scott"
on Thu Mar 11 12:26:47 2021 GMT+0.
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.
2.1 cl-poker-eval
- Author
Jason Person
- License
BSD
- Description
7-card hand poker evaluator
- Version
0.1
- Source
cl-poker-eval.asd (file)
- Components
-
3 Files
Files are sorted by type and then listed depth-first from the systems
components trees.
3.1 Lisp
3.1.1 cl-poker-eval.asd
- Location
cl-poker-eval.asd
- Systems
cl-poker-eval (system)
3.1.2 cl-poker-eval/package.lisp
- Parent
cl-poker-eval (system)
- Location
package.lisp
- Packages
cl-poker-eval
3.1.3 cl-poker-eval/cl-poker-eval.lisp
- Dependencies
-
- Parent
cl-poker-eval (system)
- Location
cl-poker-eval.lisp
- Exported Definitions
-
- Internal Definitions
-
3.1.4 cl-poker-eval/top-5-cards-tbl.lisp
- Dependencies
-
- Parent
cl-poker-eval (system)
- Location
top-5-cards-tbl.lisp
- Internal Definitions
*top-five-cards-tbl* (special variable)
3.1.5 cl-poker-eval/straight-tbl.lisp
- Dependencies
-
- Parent
cl-poker-eval (system)
- Location
straight-tbl.lisp
- Internal Definitions
*straight-table* (special variable)
3.1.6 cl-poker-eval/top-card-tbl.lisp
- Dependencies
-
- Parent
cl-poker-eval (system)
- Location
top-card-tbl.lisp
- Internal Definitions
*top-card-tbl* (special variable)
3.1.7 cl-poker-eval/poker-defs.lisp
- Dependency
package.lisp (file)
- Parent
cl-poker-eval (system)
- Location
poker-defs.lisp
- Internal Definitions
-
3.1.8 cl-poker-eval/nbits-tbl.lisp
- Dependency
package.lisp (file)
- Parent
cl-poker-eval (system)
- Location
nbits-tbl.lisp
- Internal Definitions
*nbits-tbl* (special variable)
3.1.9 cl-poker-eval/hands.lisp
- Dependency
package.lisp (file)
- Parent
cl-poker-eval (system)
- Location
hands.lisp
- Internal Definitions
-
4 Packages
Packages are listed by definition order.
4.1 cl-poker-eval
Provides interface for evaluating 7-card poker hands
- Source
package.lisp (file)
- Use List
- asdf/interface
- common-lisp
- Exported Definitions
-
- Internal Definitions
-
5 Definitions
Definitions are sorted by export status, category, package, and then by
lexicographic order.
5.1 Exported definitions
5.1.1 Functions
- Function: eval-hand-7 ()
-
- Package
cl-poker-eval
- Source
cl-poker-eval.lisp (file)
- Function: eval-hand-var ()
-
- Package
cl-poker-eval
- Source
cl-poker-eval.lisp (file)
5.2 Internal definitions
5.2.1 Constants
- Constant: +clubs-mask+
-
For masking out all clubs in a hand
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +diamonds-mask+
-
For masking out all diamonds in a hand
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-card-mask+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-card-width+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-cards-mask+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-cards-shift+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-fifth-card-mask+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-fifth-card-shift+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-flush+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-fourth-card-mask+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-fourth-card-shift+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-fullhouse+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-handtype-mask+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-handtype-shift+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-nopair+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-onepair+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-quads+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-second-card-mask+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-second-card-shift+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-stflush+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-straight+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-third-card-mask+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-third-card-shift+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-top-card-mask+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-top-card-shift+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-trips+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +handval-twopair+
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +hearts-mask+
-
For masking out all hearts in a hand
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Constant: +spades-mask+
-
For masking out all spades in a hand
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
5.2.2 Special variables
- Special Variable: *nbits-tbl*
-
- Package
cl-poker-eval
- Source
nbits-tbl.lisp (file)
- Special Variable: *straight-table*
-
- Package
cl-poker-eval
- Source
straight-tbl.lisp (file)
- Special Variable: *top-card-tbl*
-
- Package
cl-poker-eval
- Source
top-card-tbl.lisp (file)
- Special Variable: *top-five-cards-tbl*
-
- Package
cl-poker-eval
- Source
top-5-cards-tbl.lisp (file)
5.2.3 Macros
- Macro: handtype-topcard-value HV TPC
-
- Package
cl-poker-eval
- Source
cl-poker-eval.lisp (file)
- Macro: str-strflush-value DUPS RANK &rest SUIT-MASKS
-
- Package
cl-poker-eval
- Source
cl-poker-eval.lisp (file)
5.2.4 Functions
- Function: eval-fullhouse ()
-
- Package
cl-poker-eval
- Source
cl-poker-eval.lisp (file)
- Function: eval-hand ()
-
- Package
cl-poker-eval
- Source
cl-poker-eval.lisp (file)
- Function: eval-quads ()
-
- Package
cl-poker-eval
- Source
cl-poker-eval.lisp (file)
- Function: eval-trips ()
-
- Package
cl-poker-eval
- Source
cl-poker-eval.lisp (file)
- Function: eval-twopair ()
-
- Package
cl-poker-eval
- Source
cl-poker-eval.lisp (file)
- Function: eval-twopair-2 ()
-
- Package
cl-poker-eval
- Source
cl-poker-eval.lisp (file)
- Function: get-cards HAND
-
- Package
cl-poker-eval
- Source
hands.lisp (file)
- Function: get-high-card ()
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Function: get-top-card ()
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Function: handval-fifth-card-value ()
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Function: handval-fourth-card-value ()
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Function: handval-handtype-value ()
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Function: handval-second-card-value ()
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Function: handval-third-card-value ()
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Function: handval-top-card-value ()
-
- Package
cl-poker-eval
- Source
poker-defs.lisp (file)
- Function: make-cards-masks &rest CARDS
-
- Package
cl-poker-eval
- Source
hands.lisp (file)
- Function: make-hand-var &rest CARDS
-
- Package
cl-poker-eval
- Source
hands.lisp (file)
Appendix A Indexes
A.1 Concepts
| Index Entry | | Section |
|
C | | |
| cl-poker-eval.asd: | | The cl-poker-eval․asd file |
| cl-poker-eval/cl-poker-eval.lisp: | | The cl-poker-eval/cl-poker-eval․lisp file |
| cl-poker-eval/hands.lisp: | | The cl-poker-eval/hands․lisp file |
| cl-poker-eval/nbits-tbl.lisp: | | The cl-poker-eval/nbits-tbl․lisp file |
| cl-poker-eval/package.lisp: | | The cl-poker-eval/package․lisp file |
| cl-poker-eval/poker-defs.lisp: | | The cl-poker-eval/poker-defs․lisp file |
| cl-poker-eval/straight-tbl.lisp: | | The cl-poker-eval/straight-tbl․lisp file |
| cl-poker-eval/top-5-cards-tbl.lisp: | | The cl-poker-eval/top-5-cards-tbl․lisp file |
| cl-poker-eval/top-card-tbl.lisp: | | The cl-poker-eval/top-card-tbl․lisp file |
|
F | | |
| File, Lisp, cl-poker-eval.asd: | | The cl-poker-eval․asd file |
| File, Lisp, cl-poker-eval/cl-poker-eval.lisp: | | The cl-poker-eval/cl-poker-eval․lisp file |
| File, Lisp, cl-poker-eval/hands.lisp: | | The cl-poker-eval/hands․lisp file |
| File, Lisp, cl-poker-eval/nbits-tbl.lisp: | | The cl-poker-eval/nbits-tbl․lisp file |
| File, Lisp, cl-poker-eval/package.lisp: | | The cl-poker-eval/package․lisp file |
| File, Lisp, cl-poker-eval/poker-defs.lisp: | | The cl-poker-eval/poker-defs․lisp file |
| File, Lisp, cl-poker-eval/straight-tbl.lisp: | | The cl-poker-eval/straight-tbl․lisp file |
| File, Lisp, cl-poker-eval/top-5-cards-tbl.lisp: | | The cl-poker-eval/top-5-cards-tbl․lisp file |
| File, Lisp, cl-poker-eval/top-card-tbl.lisp: | | The cl-poker-eval/top-card-tbl․lisp file |
|
L | | |
| Lisp File, cl-poker-eval.asd: | | The cl-poker-eval․asd file |
| Lisp File, cl-poker-eval/cl-poker-eval.lisp: | | The cl-poker-eval/cl-poker-eval․lisp file |
| Lisp File, cl-poker-eval/hands.lisp: | | The cl-poker-eval/hands․lisp file |
| Lisp File, cl-poker-eval/nbits-tbl.lisp: | | The cl-poker-eval/nbits-tbl․lisp file |
| Lisp File, cl-poker-eval/package.lisp: | | The cl-poker-eval/package․lisp file |
| Lisp File, cl-poker-eval/poker-defs.lisp: | | The cl-poker-eval/poker-defs․lisp file |
| Lisp File, cl-poker-eval/straight-tbl.lisp: | | The cl-poker-eval/straight-tbl․lisp file |
| Lisp File, cl-poker-eval/top-5-cards-tbl.lisp: | | The cl-poker-eval/top-5-cards-tbl․lisp file |
| Lisp File, cl-poker-eval/top-card-tbl.lisp: | | The cl-poker-eval/top-card-tbl․lisp file |
|
A.2 Functions
| Index Entry | | Section |
|
E | | |
| eval-fullhouse : | | Internal functions |
| eval-hand : | | Internal functions |
| eval-hand-7 : | | Exported functions |
| eval-hand-var : | | Exported functions |
| eval-quads : | | Internal functions |
| eval-trips : | | Internal functions |
| eval-twopair : | | Internal functions |
| eval-twopair-2 : | | Internal functions |
|
F | | |
| Function, eval-fullhouse : | | Internal functions |
| Function, eval-hand : | | Internal functions |
| Function, eval-hand-7 : | | Exported functions |
| Function, eval-hand-var : | | Exported functions |
| Function, eval-quads : | | Internal functions |
| Function, eval-trips : | | Internal functions |
| Function, eval-twopair : | | Internal functions |
| Function, eval-twopair-2 : | | Internal functions |
| Function, get-cards : | | Internal functions |
| Function, get-high-card : | | Internal functions |
| Function, get-top-card : | | Internal functions |
| Function, handval-fifth-card-value : | | Internal functions |
| Function, handval-fourth-card-value : | | Internal functions |
| Function, handval-handtype-value : | | Internal functions |
| Function, handval-second-card-value : | | Internal functions |
| Function, handval-third-card-value : | | Internal functions |
| Function, handval-top-card-value : | | Internal functions |
| Function, make-cards-masks : | | Internal functions |
| Function, make-hand-var : | | Internal functions |
|
G | | |
| get-cards : | | Internal functions |
| get-high-card : | | Internal functions |
| get-top-card : | | Internal functions |
|
H | | |
| handtype-topcard-value : | | Internal macros |
| handval-fifth-card-value : | | Internal functions |
| handval-fourth-card-value : | | Internal functions |
| handval-handtype-value : | | Internal functions |
| handval-second-card-value : | | Internal functions |
| handval-third-card-value : | | Internal functions |
| handval-top-card-value : | | Internal functions |
|
M | | |
| Macro, handtype-topcard-value : | | Internal macros |
| Macro, str-strflush-value : | | Internal macros |
| make-cards-masks : | | Internal functions |
| make-hand-var : | | Internal functions |
|
S | | |
| str-strflush-value : | | Internal macros |
|
A.3 Variables
| Index Entry | | Section |
|
* | | |
| *nbits-tbl* : | | Internal special variables |
| *straight-table* : | | Internal special variables |
| *top-card-tbl* : | | Internal special variables |
| *top-five-cards-tbl* : | | Internal special variables |
|
+ | | |
| +clubs-mask+ : | | Internal constants |
| +diamonds-mask+ : | | Internal constants |
| +handval-card-mask+ : | | Internal constants |
| +handval-card-width+ : | | Internal constants |
| +handval-cards-mask+ : | | Internal constants |
| +handval-cards-shift+ : | | Internal constants |
| +handval-fifth-card-mask+ : | | Internal constants |
| +handval-fifth-card-shift+ : | | Internal constants |
| +handval-flush+ : | | Internal constants |
| +handval-fourth-card-mask+ : | | Internal constants |
| +handval-fourth-card-shift+ : | | Internal constants |
| +handval-fullhouse+ : | | Internal constants |
| +handval-handtype-mask+ : | | Internal constants |
| +handval-handtype-shift+ : | | Internal constants |
| +handval-nopair+ : | | Internal constants |
| +handval-onepair+ : | | Internal constants |
| +handval-quads+ : | | Internal constants |
| +handval-second-card-mask+ : | | Internal constants |
| +handval-second-card-shift+ : | | Internal constants |
| +handval-stflush+ : | | Internal constants |
| +handval-straight+ : | | Internal constants |
| +handval-third-card-mask+ : | | Internal constants |
| +handval-third-card-shift+ : | | Internal constants |
| +handval-top-card-mask+ : | | Internal constants |
| +handval-top-card-shift+ : | | Internal constants |
| +handval-trips+ : | | Internal constants |
| +handval-twopair+ : | | Internal constants |
| +hearts-mask+ : | | Internal constants |
| +spades-mask+ : | | Internal constants |
|
C | | |
| Constant, +clubs-mask+ : | | Internal constants |
| Constant, +diamonds-mask+ : | | Internal constants |
| Constant, +handval-card-mask+ : | | Internal constants |
| Constant, +handval-card-width+ : | | Internal constants |
| Constant, +handval-cards-mask+ : | | Internal constants |
| Constant, +handval-cards-shift+ : | | Internal constants |
| Constant, +handval-fifth-card-mask+ : | | Internal constants |
| Constant, +handval-fifth-card-shift+ : | | Internal constants |
| Constant, +handval-flush+ : | | Internal constants |
| Constant, +handval-fourth-card-mask+ : | | Internal constants |
| Constant, +handval-fourth-card-shift+ : | | Internal constants |
| Constant, +handval-fullhouse+ : | | Internal constants |
| Constant, +handval-handtype-mask+ : | | Internal constants |
| Constant, +handval-handtype-shift+ : | | Internal constants |
| Constant, +handval-nopair+ : | | Internal constants |
| Constant, +handval-onepair+ : | | Internal constants |
| Constant, +handval-quads+ : | | Internal constants |
| Constant, +handval-second-card-mask+ : | | Internal constants |
| Constant, +handval-second-card-shift+ : | | Internal constants |
| Constant, +handval-stflush+ : | | Internal constants |
| Constant, +handval-straight+ : | | Internal constants |
| Constant, +handval-third-card-mask+ : | | Internal constants |
| Constant, +handval-third-card-shift+ : | | Internal constants |
| Constant, +handval-top-card-mask+ : | | Internal constants |
| Constant, +handval-top-card-shift+ : | | Internal constants |
| Constant, +handval-trips+ : | | Internal constants |
| Constant, +handval-twopair+ : | | Internal constants |
| Constant, +hearts-mask+ : | | Internal constants |
| Constant, +spades-mask+ : | | Internal constants |
|
S | | |
| Special Variable, *nbits-tbl* : | | Internal special variables |
| Special Variable, *straight-table* : | | Internal special variables |
| Special Variable, *top-card-tbl* : | | Internal special variables |
| Special Variable, *top-five-cards-tbl* : | | Internal special variables |
|
A.4 Data types