showdown: showdown

Description Usage Arguments Value See Also Examples

View source: R/poker.R

Description

Determine the ranking of the hands.

Usage

1
showdown(cards)

Arguments

cards

:

the 7 card hand as matrix[nPlayers, 14]
col1: rank of card 1 in {2, ... , 14}
col2: suit of card 1 in {1, 2, 3, 4}
col3: rank of card 2
col4: suit of card 2

Value

score : the score of the hand in absolute terms as vector[nPlayers]
9 = Straight Flush
8 = Four of a Kind
7 = Full House
6 = Flush
5 = Straight
4 = Three of a Kind
3 = Two Pair
2 = One Pair
1 = High Card

See Also

dotScorer

Examples

1
showdown(matrix( c( 2,1,3,2,5,3,6,4,7,1,13,2,14,2,2,3,2,4,5,1,6,2,7,3,13,4,14,4),2,14,byrow=TRUE))

greenspb/poker documentation built on May 6, 2019, 9:50 p.m.