Card Game Question

So I am creating a card game on DESMOS. I am working with a random card generator for part of the game and I want to use this card generator for multiple rounds and on multiple slides.

What I am trying to accomplish is that once I use a card on a slide, I want to discard it so that I cannot use it on another slide. So for example, if I have 20 random cards on slide 1 and draw a card, I don’t want to use that card again for the game, and have 19 cards on slide 3. Then repeat the process.

Is there a way I can create that on desmos?

Hi,
I believe we can get you up and running on this, could you give a little more information (which component are you using to display/have students select the card?) or do you possibly have a link.

I’m trying to post a link but can’t right now.

This is the one I am using

Hi, I didn’t have the time to create an activity (I’ll come back to it later)
but I simplified the desmos graph in such a way that now you are able to tell the graph
which cards you want to exclude because they have already been dealt in previous slides:

I hope this is something we can work with …

Ok, here it is … This should work …

In each slide some cards are dealt and they will not be reused in the following slides.
Some variable you can set in the graph or via CL:

  • n_cards is the number of card to deal
  • L is the list of cards, [1…52]
  • U is the list of cards that are usable in that slide,
  • D is the list of cards dealt in that slide

hope it’s clear:

be careful not to use the “deal” button when modifying the graph because it will change the code for the list U.

1 Like

Nice! Here’s a different method to remove using list comprehension.

1 Like

That’s actually way better!!! …
I don’t like messing with division by zero, infinite and rounding.

I appreciate all the help, I will try some of these out and get back to you.

To give some more context, I am creating a virtual version of a Game of Life that a friend made. Basically how I want to set the game up would be

Slide 1: Pick a Career
Slide 2: Wildcard
Slide 3: Pick Housing
Slide 4: Wildcard
Slide 5: Pick Transportation
Slide 6: Wildcard
Slide 7: Food
Slide 8: Wildcard
Slide 9: Subscriptions
Slide 10: Wildcard
Slide 11: Medical
Slide 12: Wildcard
Slide 13: Travel and Entertainment
Slide 14: Wildcard
Slide 15: Other Discretionary Spending
Slide 16: Wildcard
Slide 17: Debt Spending
Slide 18: Wildcard
Slide 19: Reflection

The odd slides would just be pictures (and they would just select the options on the screen). The even slides would be where the cards would be drawn.

Also, I would love to create two different versions of the game: one for single player and one for multi-player, could that be possible to do as well?

1 Like

Update us on what you do … or ask if you have any questions …

Btw:
“Game of Life” does normally refer to Conway’s Game of Life which would be nice to implement in desmos …

Oh, not that game of life.

The board game. :smile: