Learn R Programming

poker (version 0.8.8)

dotScorer: dotScorer

Description

Determine the ranking of one hand.

Usage

dotScorer(cardsRow)

Arguments

cardsRow

:

one 7 card hand as vector[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
.
.
.
col13: rank of card 7

Value

ranking : the rank of the hand as integer in {2, ... , 9}
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

dotTransformToNumber, dotTransformToRank

Examples

Run this code
# NOT RUN {
dotScorer(c(2,1,3,2,5,3,6,4,7,1,13,2,14,2))
dotScorer(c(2,1,2,2,5,3,6,4,7,1,13,2,14,2))
dotScorer(c(2,1,2,2,5,3,5,4,7,1,13,2,14,2))
dotScorer(c(2,1,2,2,2,3,5,4,7,1,13,2,14,2))
dotScorer(c(2,1,3,2,4,3,5,4,6,1,13,2,14,2))
dotScorer(c(2,1,3,1,5,1,6,1,7,1,13,2,14,2))
dotScorer(c(2,1,2,2,2,8,13,8,7,1,13,2,14,2))
dotScorer(c(2,1,2,2,2,3,2,4,7,1,13,2,14,2))
dotScorer(c(2,1,3,1,4,1,5,1,6,1,7,1,14,2))
# }

Run the code above in your browser using DataLab