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
- We’ve created a new project repo:
Agenda for this week
- Weekly Journal Review
- Walk-through of last week
- King of Tokyo Recap, focusing on the cards
- Walk-through of the Fisher–Yates algorithm
- Random permutations are tight!
- Shuffling a deck of cards as an array of objects:
- Deal 3 cards face-up with
Array.prototype.pop()
and Array.prototype.push()
.
- Buy a “Discard” card.
- Deal a card face-up to replace bought/discarded card.
- Move card to discard pile.
- Sweep all three face-up cards.
Relevant repos
Cleanup
- Update schedule for next stream (README.md)