The cl-poker-eval Reference Manual

Table of Contents

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 2.3 "Robert April" on Tue Feb 20 08:14:08 2018 GMT+0.


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

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.


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

2 Systems

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


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

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

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

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 files   [Contents][Index]

3.1.1 cl-poker-eval.asd

Location

cl-poker-eval.asd

Systems

cl-poker-eval (system)


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

3.1.2 cl-poker-eval/package.lisp

Parent

cl-poker-eval (system)

Location

package.lisp

Packages

cl-poker-eval


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

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

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

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)


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

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)


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

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)


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

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

Dependency

package.lisp (file)

Parent

cl-poker-eval (system)

Location

poker-defs.lisp

Internal Definitions

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

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)


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

3.1.9 cl-poker-eval/hands.lisp

Dependency

package.lisp (file)

Parent

cl-poker-eval (system)

Location

hands.lisp

Internal Definitions

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

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

Use List
Exported Definitions
Internal Definitions

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

5 Definitions

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


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

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

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)


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

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [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 (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)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

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)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

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)


Previous: , Up: Internal definitions   [Contents][Index]

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)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-poker-eval.asd: The cl-poker-eval<dot>asd file
cl-poker-eval/cl-poker-eval.lisp: The cl-poker-eval/cl-poker-eval<dot>lisp file
cl-poker-eval/hands.lisp: The cl-poker-eval/hands<dot>lisp file
cl-poker-eval/nbits-tbl.lisp: The cl-poker-eval/nbits-tbl<dot>lisp file
cl-poker-eval/package.lisp: The cl-poker-eval/package<dot>lisp file
cl-poker-eval/poker-defs.lisp: The cl-poker-eval/poker-defs<dot>lisp file
cl-poker-eval/straight-tbl.lisp: The cl-poker-eval/straight-tbl<dot>lisp file
cl-poker-eval/top-5-cards-tbl.lisp: The cl-poker-eval/top-5-cards-tbl<dot>lisp file
cl-poker-eval/top-card-tbl.lisp: The cl-poker-eval/top-card-tbl<dot>lisp file

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

L
Lisp File, cl-poker-eval.asd: The cl-poker-eval<dot>asd file
Lisp File, cl-poker-eval/cl-poker-eval.lisp: The cl-poker-eval/cl-poker-eval<dot>lisp file
Lisp File, cl-poker-eval/hands.lisp: The cl-poker-eval/hands<dot>lisp file
Lisp File, cl-poker-eval/nbits-tbl.lisp: The cl-poker-eval/nbits-tbl<dot>lisp file
Lisp File, cl-poker-eval/package.lisp: The cl-poker-eval/package<dot>lisp file
Lisp File, cl-poker-eval/poker-defs.lisp: The cl-poker-eval/poker-defs<dot>lisp file
Lisp File, cl-poker-eval/straight-tbl.lisp: The cl-poker-eval/straight-tbl<dot>lisp file
Lisp File, cl-poker-eval/top-5-cards-tbl.lisp: The cl-poker-eval/top-5-cards-tbl<dot>lisp file
Lisp File, cl-poker-eval/top-card-tbl.lisp: The cl-poker-eval/top-card-tbl<dot>lisp file

Jump to:   C   F   L  

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

A.2 Functions

Jump to:   E   F   G   H   M   S  
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

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*: 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

Jump to:   *   +  
C   S  

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

A.4 Data types

Jump to:   C   P   S  
Index Entry  Section

C
cl-poker-eval: The cl-poker-eval system
cl-poker-eval: The cl-poker-eval package

P
Package, cl-poker-eval: The cl-poker-eval package

S
System, cl-poker-eval: The cl-poker-eval system

Jump to:   C   P   S