11-16-2020, 02:21 PM
(11-16-2020, 01:03 PM)Quentin Cohen-Solal Wrote: I was rather thinking of the size chosen as an option (for games with such an option).
That's not really something we support currently, at least not in a very clean and easy way. The options are only used for preprocessing the contents of the game description file before compiling the game, and after game compilation the game itself is completely oblivious to the fact that it used to have different kinds of options available.
If you know that you're working with the GUI, you can try this code:
Code:
game.description().gameOptions().allOptionStrings(SettingsManager.userSelections.selectedOptionStrings())
That line should return a List<String> containing string descriptions of all the selected options (including ones that were left at their default values. That should include things like "Board Size/5x5" for example.
But that "SettingsManager.userSelections" thing used in there is only valid if you're working from inside the GUI, that provides access to what the user selected inside the GUI. If you're running experiments programmatically, without the GUI existing, this will either just be garbage data or maybe even cause crashes. Of course, in the programmatic use cases you probably also would have already written the code that chooses which games to compile, and with which options, yourself, so you would have to somehow save the options you used at that stage.