projectmesa / mesa-examples

User and showcase agent-based models developed using Mesa
Other
127 stars 155 forks source link

bug fix and code simplification in hotelling #223

Closed quaquel closed 1 month ago

quaquel commented 1 month ago

follow up from #198

quaquel commented 1 month ago

Maybe we can even add random_cell and random_empty_cell properties to the spaces, so that you don't have to go via all_cells (just an idea, other PR of course).

Yes having it on the grid would be easy (as would be a method for drawing 1 cells with replacement and without replacement - Both can probably be added to `CellCollection first).