and

Combines this strategy with other using logical AND.

If this strategy is already an AndStrategy, the other strategy is appended to its list, creating a flat structure instead of nesting.

Example:

val strategy = strategyA and strategyB and strategyC
// Creates AndStrategy([a, b, c]) instead of AndStrategy([AndStrategy([a, b]), c])

Return

An AndStrategy that evaluates to true only if all strategies return true.

Parameters

other

The strategy to combine with.