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

Introduce a Condition class? #64

Closed Itangalo closed 2 years ago

Itangalo commented 2 years ago

There are cases where conditions may get quite complex when modeling board games, and conditions are used in quite a few functions. It could make sense to introduce a Condition class, which itself evaluates the condition(s).

Itangalo commented 2 years ago

Yes. An ObjectContition class, with .addAndCondition, .addOrCondition, .addNotCondition .evaluateOn(), .selectFromArray() and .spliceFromArray().

Added conditions are either property:value pairs, in some thought-through format, or another ObjectCondition object.

Itangalo commented 2 years ago

Also have comparisons like ">" and "<="?

Itangalo commented 2 years ago

Docs in place.

Itangalo commented 2 years ago

Tests in place. Moving rest of potential functionality to a new issue.