Closed Oliver-Akins closed 3 years ago
There are currently no plans to "view the top X cards," and honestly I can't imagine a world where we'd want to do that.
The only function I can imagine that even comes close is drawing a sample Object card, but if we ever add that it can just be hardcoded
Cool, in that case the Deck object is fine as it is currently. I'll close this issue now that it's resolved.
There are two ways that the decks can be drawn from:
Both of these have the same time/space complexity in the code, the second one is just a lot easier to implement, the first one, this is because there's really no nice way of shuffling an array in TS, but if there's a chance of there being a "view the top X cards of the deck", then we need to use the first one as the second one will not work for the use case to any degree.
If there are currently no plans for the "view top cards" of the deck I will implement it as option 2, and then if that changes sometime in the future I can revisit the implementation and modify as needed.