Itangalo / Bot-Playtesting-Toolkit

A toolkit for simulating board games with Google spreadsheets. Intended use is board game development.
GNU General Public License v3.0
9 stars 1 forks source link

Goods: limiting access #32

Open Itangalo opened 2 years ago

Itangalo commented 2 years ago

Goods could have something like goods.checkAccess() that restricts who can buy it. Good when some goods (such as actions) are only available for one player.

Itangalo commented 2 years ago

Or: Is this better handled by markets belonging to each player? No. Some goods are available to more than one player, but not all.

Itangalo commented 2 years ago

A crude but working solution would be to have a property 'accessibleFor' for each goods (or alternative price), being an array of agent IDs. If an array is present, only the listed agents can use the price.

Itangalo commented 2 years ago

An alternative is to have an access callback function, passing the agent as argument. This would be more useful for cases like "only players with at least 4 bases can buy this achievement".