dotScorer: dotScorer

Description Usage Arguments Value See Also Examples

View source: R/poker.R

Description

Determine the ranking of one hand.

Usage

1
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
col14: suit 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
1 = High Card

See Also

dotTransformToNumber, dotTransformToRank

Examples

1
2
3
4
5
6
7
8
9
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))

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