Learn R Programming

poker (version 0.8.8)

transformToRelative: transformToRelative

Description

Transforms an absolute position (i.e., seat at the table) into a relative position (i.e., seats behind the dealer)

Usage

transformToRelative(nPlayers, position, j)

Arguments

nPlayers

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

position

dealer position as integer in {2, ..., nPlayers}

j

absolute position of a player as integer in {1, 2, ... , nPlayers}

Value

k : relative position of a player as integer in {1, 2, ... , nPlayers}

Examples

Run this code
# NOT RUN {
transformToRelative(9,9,9)
transformToRelative(9,9,8)
transformToRelative(9,1,9)
transformToRelative(9,5,2)
# }

Run the code above in your browser using DataLab