Skip to main content

Ep 5 - Building a Deck Shuffler with Ashlyn Knox

Published: 2022-08-13
Updated: 2022-08-18

Topics covered

  • Shuffling a deck of cards using the Fisher–Yates algorithm
  • Dealing and discarding cards with:
    • Array.prototype.pop()
    • Array.prototype.push()

Housekeeping

Agenda for this week

  1. Weekly Journal Review
  2. Walk-through of last week
  3. King of Tokyo Recap, focusing on the cards
  4. Walk-through of the Fisher–Yates algorithm
    • Random permutations are tight!
  5. Shuffling a deck of cards as an array of objects:
  6. Deal 3 cards face-up with Array.prototype.pop() and Array.prototype.push().
  7. Buy a “Discard” card.
    • Deal a card face-up to replace bought/discarded card.
    • Move card to discard pile.
  8. Sweep all three face-up cards.

Relevant repos

Cleanup

  • Update schedule for next stream (README.md)