Open MaanooAk opened 4 years ago
Very good idea! We should do the same here :)
I'd adapt the syntax a slight little bit though: instead of Barracks creates
I'd use Barracks.creates
or Barracks:creates
. That should also simplify parsing a bit, because space #
then is always #
and member access is uniquely formatted.
We should also add a syntax to refer to points in time, and to create transactions with >1 patches.
Good idea!
This could be extended with API-specific tests that can assert whether our state transitions for game entities are correct and whether AvalabilityRequirement
and Condition
work like they should.
A suggestion for testing (what I am using in jnyan):
Where the root folders are test cases with loaded file being the main.nyan (which may include import statements) and in the sim (= simulation) folders there are files with commands in order to simulate a scenario. Every line is command, mainly assert like commands but also execution of patches.
Source: jnyan/src/test/resources/tests/000