dotPair: dotPair

Description Usage Arguments Value See Also Examples

View source: R/poker.R

Description

Determine the player(s) with the highest pair and kicker cards.

Usage

1
dotPair(nPlayers, cards, score)

Arguments

nPlayers

number of hands as integer in {2, ... , 9}

cards

:

the 7 card hands 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
.
.
.
col13: rank of card 7
col14: suit of card 7
score

:

the score of the hands 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

Value

winner : absolute position of the winner as vector

See Also

dotPairRanker and dotHighcardCompare

Examples

1
2
3
4
cards <- c(2,3,4,1,1,1,2,3,6,2,2,2,4,4,4,3,3,3,11,11,11,3,3,3,13,13,13)
cards <- c(cards,3,3,3,14,14,14,3,3,3,9,9,9,4,4,4)
cards <- matrix(cards,nrow=3,ncol=14)
dotPair(3,cards,c(2,2,2))

Example output

[1] 3

poker documentation built on May 2, 2019, 3:45 a.m.

Related to dotPair in poker...