Hello people.
In class we encountered a pretty complexed sampling problem. well, for me its complex.
It goes like this:
Create a vector of 5 names
Create a vector of all 52 cards (no jokers)
Hand your players 5 cards.
Well, that basically it.
I tried to start by creating my vector of names c("ä", "b", "c", "d", "e")
then the stack of cards i was like.. neh. its basically 52 unique items, so a c(1:52) will do just fine for the sake of programming.
Now im stuck.
Obviously we're talking about a replace=F argument, but the output has to be each name along with 5 cards. im pretty stuck.
Something like this? I made a list to hold the players hands, you can use their names for indexing.
Every time you deal you have to remove the cards from the deck, as well as add them to the players hands.