kistaro
deb3b1c5a1
Don't charge an action point for debug drawing.
2023-04-15 17:26:02 -07:00
kistaro
4a91230376
Smoke testing for debug actions.
...
Just moves one of the existing actions to a debug action slot.
2023-04-15 17:21:28 -07:00
kistaro
54711b36a8
Display debug enactables.
...
Includes some refactoring work to pull out common code and express the idea of "wait, which panel, exactly?".
2023-04-15 17:17:51 -07:00
kistaro
6c3c936dbd
Debug Actions: Another set of permanent actions.
...
These are only reachable in debug mode.
2023-04-15 16:06:55 -07:00
kistaro
8d9303c8bc
stats manual in README
2023-04-04 12:29:36 -07:00
kistaro
ad9e5764f1
Allow renaming of extracted stats via tag.
v0.3.0
2023-04-04 12:14:04 -07:00
kistaro
99e372a4db
Fix it
...
Pointer vs. value receivers are... interesting.
v0.2
v0.2.0
v0.2.1
2023-04-04 11:37:02 -07:00
kistaro
3e34e25f54
Major stats upgrade.
...
StatLiteral: just emit a stat in the obvious way. Plus helper functions.
Can also identify stats via struct tags, no more Stored type!
Can also identify stat methods via name (with compatible types).
2023-04-04 11:12:07 -07:00
kistaro
1464070339
Fix excess divider mess in message display.
v0.1.3
2023-04-03 01:45:38 -07:00
kistaro
066ec431ff
Clan up go.mod.
v0.1.1
v0.1.2
2023-04-02 22:30:21 -07:00
kistaro
3455579be6
Fix module spec.
2023-04-02 22:25:12 -07:00
kistaro
5a7cb58707
Add Godoc badge
2023-04-02 22:14:11 -07:00
kistaro
74a2493ef4
Clear screen before displaying panel in stats mode.
0.1.0
v0.1.0
2023-04-02 19:37:55 -07:00
kistaro
2c2e68ff93
Fix shadowing bug in rules engine.
2023-04-02 19:36:28 -07:00
kistaro
d13e04e2f4
Debug utility function and comments
2023-04-02 19:35:07 -07:00
kistaro
57348f7ebf
Add a bunch of logging.
2023-04-02 19:33:44 -07:00
kistaro
9796c2e970
First round of substantial bug fixes
2023-04-02 19:25:53 -07:00
kistaro
0f21020647
More fencepost errors!
2023-04-02 19:08:26 -07:00
kistaro
e96d81a7b4
Fencepost error!
...
Also the title is visible.
2023-04-02 19:07:05 -07:00
kistaro
3a7bf9c2fb
Don't adjust twice.
2023-04-02 19:05:15 -07:00
kistaro
00ea284cbc
Nil is not an error, much less a serious one.
2023-04-02 19:03:39 -07:00
kistaro
159f6b6b5f
Fix type.
2023-04-02 19:02:43 -07:00
kistaro
2480a1631b
Implement a very crude "game" as a test. Also updates Player.
2023-04-02 19:01:40 -07:00
kistaro
2875dc5af8
Implement review mode.
...
This finishes the UI.
2023-04-02 13:58:56 -07:00
kistaro
74ca51b21d
actions mode, prompt cleanup
...
Fixes some off-by-one errors. A 1-indexed UI in a 0-indexed language is always going to be prone to those and I will no doubt find more when I have enough of a test program to experiment with...
2023-04-02 13:19:26 -07:00
kistaro
5a2158f525
Implement Stats Mode.
...
Also rewords some prompts. Might as well be thorough in accepting reasonable inputs.
2023-04-02 12:54:52 -07:00
kistaro
25a9eed3f0
Prompt for player choices on cards.
...
Also handles errors in the display/prompt logic somewhat better.
2023-04-02 12:44:29 -07:00
kistaro
592c877852
More display components.
2023-04-02 00:43:17 -07:00
kistaro
e1eac9de0f
displayStatsMenu
2023-04-02 00:36:12 -07:00
kistaro
7371cddab3
Add more dividers
2023-04-02 00:28:34 -07:00
kistaro
aecd8683b2
Restructure loop, basic display functions
2023-04-02 00:26:34 -07:00
kistaro
a62de999ea
Panel display, MultiMessage.
2023-04-02 00:20:37 -07:00
kistaro
3eb087201f
more terminal utility functions
2023-04-02 00:09:17 -07:00
kistaro
c73545fd07
Implement screen clear.
2023-04-02 00:02:25 -07:00
kistaro
34e1f3166f
Main display mode skeleton
2023-04-01 23:59:53 -07:00
kistaro
af9d9a6579
Skeleton of prototypical UI.
2023-04-01 23:22:50 -07:00
kistaro
9e659ecf41
InitPlayer
...
InitPlayer creates very not-ready Player with its basic data structures initialized to an empty, ready-for-data state.
2023-04-01 22:19:42 -07:00
kistaro
09fdf19948
CardOption.Enable
...
Make it possible for a card to display an option but not actually allow it to be selected. It's up to the UI layer to decide how to display options that are not enabled. The option text should probably contiain a note on why the option cannot be selected...
2023-04-01 22:09:05 -07:00
kistaro
45e1eeebf7
Play cards.
2023-04-01 21:18:48 -07:00
kistaro
576a2dd69e
Implement drawing and running a turn.
2023-04-01 20:52:46 -07:00
kistaro
a6b2c92f86
Comment and reorganize Player.
2023-04-01 20:04:20 -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
99e9e35b1d
Card.Drawn, to give cards a chance to not show up
...
A card can be shuffled into the deck because of a certain condition, and then that condition could cease to apply. If the card should not be presented to the player, it gets one last chance to hide.
There is currently no direct mechanism for making a card _already in the hand_ disappear if it is not relevant, although there are various ways to implement a Rule to do this.
2023-04-01 18:05:57 -07:00
kistaro
fd35090b34
Generics tutorial on Rule
2023-04-01 17:56:31 -07:00
kistaro
d569e77fc9
Fix InsertRandomRange warnings.
...
I was using the wrong format string.
2023-04-01 14:39:56 -07:00
kistaro
bcfd42970b
BasicStatsPanel
...
Implement a stats panel with a name, intro text, and a rule for how to pull stats out of a collection.
2023-04-01 14:38:45 -07:00