View source: R/decklist_handling.R
gen_int_decklist | R Documentation |
LoR uses a custom encoding scheme (laid out here) to store information about the cards (and their count) in any given deck as an integer vector. This function takes care of this.
gen_int_decklist(decklist)
decklist |
dataframe with character column cardcode adn numeric column count |
integer representation of deck code
#minimalist example min_deck <- data.frame( "cardcode" = c("01PZ008", "01PZ040"), "count" = c(3, 3) ) lordecks:::gen_int_decklist(min_deck) # returns : "17" "1" "2" "1" "4" "8" "40" "0" "0" # version/format 17 ("00010001"), last 4 bits are version (=1) # 1 group of 3 copies # 2 cards for combination of # 1 set 1 and # 4 faction 4 (PZ) # 8 card code 01PZ008 # 40 card code 01PZ040 # 0 group of 2 copies # 0 group if 1 copy
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.