Learn R Programming

poker (version 0.8.8)

showdown: showdown

Description

Determine the ranking of the hands.

Usage

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

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

See Also

dotScorer

Examples

Run this code
# NOT RUN {
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))
# }

Run the code above in your browser using DataLab