Commit Graph

6 Commits

Author SHA1 Message Date
222d4375ee
deck.Strip -- remove cards
Given a function that identifies cards to remove, remove them from the deck. This can be used to find and strip out cards that are only conditionally appropriate (and aren't appropriate anymore).
2023-04-01 19:31:50 -07:00
b806264154
Fraction-specified shufflers.
Convenience methods for "shuffle the bottom third of the deck" and stuff like that.
2023-04-01 19:23:14 -07:00
b8c0e5603a
Add a general shuffler and deck shuffling. 2023-04-01 19:13:42 -07:00
20561c574c
sliceutil: helpers for mid-slice insert/delete.
Manipulating the hand, deck, etc. is going to use these operations a lot.
2023-04-01 18:49:06 -07:00
d569e77fc9
Fix InsertRandomRange warnings.
I was using the wrong format string.
2023-04-01 14:39:56 -07:00
f8b6b6b376
Start implementing Deck as a distinct type.
Deck does enough stuff it should be its own thing; its internal representation might change to make multiple insertions not quadratic, among other reasons. Currently it just does the obvious stuff, though. Allows inserting cards in random or specific slots and drawing cards. Shuffling a range of the deck comes later.
2023-04-01 11:50:39 -07:00