deal_cards_to_grid {mmirestriktor}R Documentation

Deal Cards to Grid

Description

This function deals n^2 cards from a specified or default deck to form an n x n grid. The remaining deck is also returned alongside the grid.

Usage

deal_cards_to_grid(deck = mmcards::shuffle_deck(), n)

Arguments

deck

A dataframe representing a deck of cards, with each row being a a card. The parameter is designed to take mmcards::shuffle_deck() or mmcards::i_deck() as input.

n

A single integer representing the number of rows and columns in the grid (i.e., the grid will be n x n). This parameter is required and does not have a default value.

Value

A list containing two elements:

Examples

  # Dealing cards to a 2x2 grid using the default shuffled deck
  deal_cards_to_grid(n = 2)


[Package mmirestriktor version 0.3.1 Index]