I found a class, "XMLEncoder" which encodes a JavaBean into XML file.
I think that this is less messy than the current "properties" implementation...
The commits in this branch removes all the manual serialization of GameOptions and back (GameOptions <-> Properties), and uses XMLEncoder and XMLDecoder instead.
In addition, the GameOptions class no longer contains the logic for loading and saving game options to file system. It is now the responsibility of the Config class to do it. The GameOptions class now only contains the options.
Also note that the configuration file name is changed to "game-options.xml" instead of "game_options.properties".
I found a class, "XMLEncoder" which encodes a JavaBean into XML file.
I think that this is less messy than the current "properties" implementation...
The commits in this branch removes all the manual serialization of GameOptions and back (GameOptions <-> Properties), and uses XMLEncoder and XMLDecoder instead.
In addition, the GameOptions class no longer contains the logic for loading and saving game options to file system. It is now the responsibility of the Config class to do it. The GameOptions class now only contains the options.
Also note that the configuration file name is changed to "game-options.xml" instead of "game_options.properties".