1eeb5115e6
Remove Unit.Past
...
Past is only used in tests. It was added speculatively in expectation that it would be useful for clients. Removing this means that all the fields of a Unit are present in the key, so the key can uniquely determine the Unit or even be parsed into one, and therefore multiple Unit instances can be equivalent if their fields match. If unit pasts are useful later, they can be tracked extrinsically the way timelines are tracked.
2024-09-09 19:40:22 -07:00
4ce5faaac2
Replace Map lookup methods with Unit methods
...
This makes the flow of data easier to read and is slightly shorter in some cases. This pattern will be better for replacing more reference members with keys.
2024-09-09 12:11:44 -07:00
9fc298adda
Remove in-code DATC A tests in favor of scripts
2024-09-06 16:42:35 +00:00
7c0cdb0a21
Add the rest of DATC 6.A to the script tests
2024-09-06 16:17:55 +00:00
5e2d495fa5
Update script tests
2024-09-06 16:04:25 +00:00
7773c571e3
Add hold-order assertion for unparseable orders
2024-09-06 16:03:43 +00:00
4096e4d517
Implement coastal accessibility checks for support-move orders
2024-09-06 15:19:58 +00:00
5b32786904
Implement support-move parsing
2024-09-05 05:27:48 +00:00
ae5eb22010
Implement support-hold parsing
2024-09-05 05:22:07 +00:00
26f7cee070
Add unit tests for move location disambiguation
...
Some of the coastal tests fail because the coast accessibility check isn't implemented yet
2024-09-05 05:11:12 +00:00
80f340c0b2
Implement assert moves/no-move
2024-09-03 04:25:37 +00:00
e9c9999268
Implement assert has-past
2024-09-03 03:49:38 +00:00
4fee854c4c
Refactor script handlers to return a result type
...
This moves the point of strictness from the handler to the driver, which makes more sense and keeps it in one place. Drivers choose to be strict when a script result is a failure but still gives a continuation handler. The CLI driver prints an error and continues, while the test driver fails if it wasn't expecting the failure.
2024-09-03 03:20:59 +00:00
569c9021e6
Disable some broken tests for now
2024-09-02 19:52:27 +00:00
f18147f666
Enable suppressing adjudicator output in tests
2024-08-28 21:27:35 +00:00
9f52c78b40
Enable repl output to /dev/null
2024-08-28 21:10:41 +00:00
7b890046b6
Add assertion stubs and unit tests
2024-08-28 19:14:19 +00:00
720ccc4329
Add standard repl helper
2024-08-28 15:09:57 +00:00
d2a46aa02d
Implement dummy assertions
2024-08-28 15:01:27 +00:00
44f2c25a2c
Add unit test for submitting orders in the repl
2024-08-28 00:46:32 +00:00
43a2517a95
Fix unit declaration commands
2024-08-28 00:45:38 +00:00
512c91d2de
Add unit test for testing the repl
2024-08-27 04:18:36 +00:00
416f2aa919
Rename to OrderParser
2024-08-27 03:23:28 +00:00
4f276df6c1
Basic order parsing and a unit test
2024-08-27 02:43:12 +00:00
24e80af7ef
Add test cases for support-move
2024-08-26 17:47:52 +00:00
33aecf876a
Add test cases for support-hold
2024-08-26 16:32:33 +00:00
b4f8f621ca
Add test cases for move order
2024-08-26 15:39:42 +00:00
ffe164975b
Remove power from UnitSpec and add hold regex tests
2024-08-26 04:57:30 +00:00
973f8ea0d7
Add Timelines.All shortcut
2024-08-25 03:36:31 +00:00
868138b988
Disable script tests for now
2024-08-25 03:17:46 +00:00
bfafb66603
Add test case for provinces with spaces
2024-08-20 14:43:02 +00:00
1689d2e9b1
Add order parsing regex
2024-08-20 14:39:49 +00:00
ea366220eb
Better error message for script failure
2024-08-18 13:32:36 -07:00
f9f8ea2b5a
Add script-based test framework
2024-08-17 21:24:59 -07:00
eaafdeb5a9
Eliminate sources of Unit reference equality
2024-08-16 20:13:15 +00:00
9a64609605
Update adjudication logging
2024-08-15 22:20:03 -07:00
889e9d173b
Reduce MoveOrder.Location to string
2024-08-15 22:01:38 -07:00
ff9e6196ad
Add Timelines serialization test
2024-08-15 16:40:23 -07:00
a02e8121eb
Rename test
2024-08-15 16:37:35 -07:00
3d664208b5
Add Season.First, replacing FIRST_TURN
2024-08-15 16:36:50 -07:00
25d903d91a
Refactor Season into a value struct
...
This keeps the rich features of a Season type without requiring constant string parsing (as much) or going through World to do lookups to get the objects. Since seasons now have value equality instead of reference equality, it's easier to get access to whem when needed. They're still, fundamentally, sugar over a tuple.
2024-08-15 13:51:41 -07:00
566d29e539
Add function to extract information from season keys
2024-08-15 08:51:17 -07:00
4b2712e4bc
Reduce Power to string
2024-08-15 07:54:53 -07:00
bfdf2d5636
Reduce Unit.Power to string
2024-08-15 07:37:05 -07:00
2e6e6c55b8
Reduce Order.Power to string
2024-08-15 07:30:43 -07:00
abbe929122
Designation -> Key
2024-08-15 06:52:08 -07:00
9185534f70
Reduce MoveOrder.Season to string
2024-08-14 22:28:56 -07:00
f2d3d5a583
Remove GetSeason(string)
2024-08-14 22:03:56 -07:00
868022d34f
Convert World.Seasons to a dictionary
2024-08-14 22:00:22 -07:00
2484d4f0fd
Get world serialization round trip kinda working
2024-08-14 21:12:58 -07:00