michaeljb / 18xx.games

Other
0 stars 0 forks source link

use `process_to_action` to more #70

Open michaeljb opened 2 months ago

michaeljb commented 2 months ago

There are a lot of tests which use the same fixture loaded to different points in the game, but they have to reprocess the game. Tests like that would be more efficient if they could just use process_to_action to jump to the next relevant point instead.

This is only really applicable for tests that don't process a new action, and just inspect state. Processing a new action would require undoing it to later use process_to_action, and undoing still reprocesses the actions like reloading the fixture would. It probably still saves a little bit of processing to avoid reloading the file.