Commit Graph

21 Commits

Author SHA1 Message Date
Kistaro Windrider c30aca1f31
Better error management.
* "Uncooperative cards" is now a warning.
* Cards and actions get "Then" invoked before the card processor considers erroring out.
* Terminal UI: Errors and warnings from actions are displayed during the response; they're not only added to the temporary messages now.
2023-04-15 20:59:21 -07:00
Kistaro Windrider abb00e30c3
Debug action to adjust debug level. 2023-04-15 20:16:54 -07:00
Kistaro Windrider 2b788f517c
Add action counter spoofer. 2023-04-15 19:36:53 -07:00
Kistaro Windrider 74fac625f2
Implement standard debuggers.
These debug actions are added to all players by default.
2023-04-15 19:16:08 -07:00
Kistaro Windrider 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 Windrider 6c3c936dbd
Debug Actions: Another set of permanent actions.
These are only reachable in debug mode.
2023-04-15 16:06:55 -07:00
Kistaro Windrider d13e04e2f4
Debug utility function and comments 2023-04-02 19:35:07 -07:00
Kistaro Windrider 57348f7ebf
Add a bunch of logging. 2023-04-02 19:33:44 -07:00
Kistaro Windrider 2480a1631b
Implement a very crude "game" as a test. Also updates Player. 2023-04-02 19:01:40 -07:00
Kistaro Windrider 2875dc5af8
Implement review mode.
This finishes the UI.
2023-04-02 13:58:56 -07:00
Kistaro Windrider af9d9a6579
Skeleton of prototypical UI. 2023-04-01 23:22:50 -07:00
Kistaro Windrider 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 Windrider 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 Windrider 45e1eeebf7
Play cards. 2023-04-01 21:18:48 -07:00
Kistaro Windrider 576a2dd69e
Implement drawing and running a turn. 2023-04-01 20:52:46 -07:00
Kistaro Windrider a6b2c92f86
Comment and reorganize Player. 2023-04-01 20:04:20 -07:00
Kistaro Windrider b324a39918
Explain generic types and add DebugLevel to Player
This simulation engine is intended for people who are interested in game design, not computer programming -- the engine wants to do all the engine stuff so the simulation can be implemented with less familiarity with the language. Generics, however, are not widely regarded as a "new programmer" thing -- even though they're surprisingly familiar, in the end  (slice-of-T, map-from-K-to-V). So a long comment explaining a bit about what's going on seems warranted.
2023-04-01 13:32:25 -07:00
Kistaro Windrider 7f8dcd63d6
Introduce InfoPanel.
InfoPanels are information displays that do not cost actions. One of them (the Prompt) is shown at the main menu; others can be made available as options in the menu, ether on an ongoing basis or for the current/next turn only.
2023-04-01 12:30:39 -07:00
Kistaro Windrider fb5735d5b9
Multiple actions per turn
Allow a pattern of multiple actions per turn. Card options can "refund" an action to the player if they should be free, or zero out the remaining actions if they should force the turn to go directly to the simulation step.
2023-04-01 12:21:42 -07:00
Kistaro Windrider 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
Kistaro Windrider 45bbfe4e8f
Initial commit.
No tests. Not complete.
2023-03-26 23:40:44 -07:00