8 Commits
Author SHA1 Message Date
kistaro 74fac625f2 Implement standard debuggers.
These debug actions are added to all players by default.
2023-04-15 19:16:08 -07:00
kistaro 75de281cee Refactor Strip (already).
Stripping cards from the Hand will also be useful, so I pulled the logic of Strip out into arrayutil (more efficiently, too) and rewrote deck.Strip to use it.
2023-04-01 19:40:28 -07:00
kistaro 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
kistaro 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
kistaro b8c0e5603a Add a general shuffler and deck shuffling. 2023-04-01 19:13:42 -07:00
kistaro 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
kistaro d569e77fc9 Fix InsertRandomRange warnings.
I was using the wrong format string.
2023-04-01 14:39:56 -07:00
kistaro 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