nkremerh / sugarscape

Development repository for the Digital Terraria Lab implementation of the Sugarscape agent-based societal simulation.
https://github.com/digital-terraria-lab/sugarscape
MIT License
7 stars 11 forks source link

Decision model coloring in GUI should be done programatically #77

Closed nkremerh closed 2 months ago

nkremerh commented 2 months ago

The names of decision models are hardcoded in the GUI and mapped to specific colors. It would be preferable if these were decided programatically.

We track which decision models are used in a particular simulation run (by looking at the configuration). We also have a range of colors provided in self.colors in the GUI. There should be a smart way to map the decision models in the simulation to colors in self.colors (with the exception of special colors, like for sugar and spice, which are off limits for hopefully obvious reasons).

Every time the interface determines to recolor based on decision model, it consults the color mapping and applies the proper color.

nkremerh commented 2 months ago

Resolved by bfefcbd.