- 1
-
The
crossingfunction creates all combinations of the things passed in to it – in this case, the suits, and the tibble with face values and points. - 2
- Define the four suits that exist in a deck of cards.
- 3
- Define the face values and the points. We have to pass these in as a tibble because we don’t want all combinations of face values and points – each face value has a separate meaning. If we were going past the initial deal, we could handle Aces separately.
# A tibble: 6 × 3
suit face points
<chr> <chr> <dbl>
1 Clubs 02 2
2 Clubs 03 3
3 Clubs 04 4
4 Clubs 05 5
5 Clubs 06 6
6 Clubs 07 7





